You are here: Forum Home → ANT+ Forums → ANT+ Fitness Equipment → Thread
// Detect if lap toogle activated
if (!lapToogleSet) {
lapToogleValue = ((stMessage.aucData[8] >> 7) & 0x01);
lapToogleSet = true;
}
else {
bool newLapToogleValue = ((stMessage.aucData[8] >> 7) & 0x01);
if (newLapToogleValue != lapToogleValue) {
qDebug() << "NEW LAP!";
emit lapChanged();
lapToogleValue = newLapToogleValue;
}
}
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com
bool powerMeasurementCalibrationRequired = ((stMessage.aucData[7] >> 4) & 0x01); //Bicycle power measurement (i.e. Zero Offset) calibration required
bool resistanceCalibrationRequired = ((stMessage.aucData[7] >> 5) & 0x01); //Resistance calibration (i.e. Spin-Down Time) required
bool userConfigurationRequired = ((stMessage.aucData[7] >> 6) & 0x01); //User configuration required
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com
/// FE State Bit Field - Present in all message /////////////////////////////////////
/// 0 Reserved
/// 1 ASLEEP (OFF)
/// 2 READY
/// 3 IN_USE
/// 4 FINISHED (PAUSED)
/// 5-7 Reserved. Do not send or interpret
int feState = 0;
bool fourValue = ((stMessage.aucData[8] >> 6) & 0x01); //2^2
bool twoValue = ((stMessage.aucData[8] >> 5) & 0x01); //2^1
bool oneValue = ((stMessage.aucData[8] >> 4) & 0x01); //2^0
if (fourValue)
feState += 4;
if (twoValue)
feState += 2;
if (oneValue)
feState += 1;
——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com