You are here: Forum Home → ANT Developers Forums → ANT General Questions → Thread
case MESG_CHANNEL_MESG_PERIOD_ID:
{
printf("GOT HERE -- ");
if(stMessage.aucData[2] != RESPONSE_NO_ERROR)
{
printf("Error configuring Channel Period: Code 0%d\n", stMessage.aucData[2]);
break;
}
printf("Channel Period set\n");
printf("Setting Radio Frequency...\n");
bStatus = pclMessageObject->SetChannelPeriod(USER_ANTCHANNEL, usMessagePeriod);
break;
}
// with this line, the demo works, but I would like usMessagePeriod to be retrieved from the device.
bStatus = pclMessageObject->SetChannelPeriod(USER_ANTCHANNEL, usMessagePeriod);
#define USER_BAUDRATE (57600) // For AT3/AP2, use 57600 //50000
#define USER_RADIOFREQ (57) // 57=HR
#define USER_ANTCHANNEL (0) // 0=RECEIVE
#define USER_DEVICENUM (0) // 0=PAIRING, MyHR=16868
#define USER_DEVICETYPE (0) // 0=PAIRING, 120=HR, 121=S&C, 11=POWER
#define USER_TRANSTYPE (0) // 0=PAIRING
#define USER_NETWORK_KEY {[Removed]} // ANT+ Managed Network Key
#define USER_NETWORK_NUM (0) // The network key is assigned to this network number
#define MESSAGE_TIMEOUT (1000)
const USHORT usMessagePeriod = 8070; // 8700=4messages/sec
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com