Exemple #1
0
// close an ant channel assignment
void ANTChannel::close()
{
    emit lostInfo(number);
    lastMessage = ANTMessage();
    parent->sendMessage(ANTMessage::close(number));
    init();
}
Exemple #2
0
// Open an ant channel assignment.
void ANTChannel::open(int device, int chan_type)
{
    channel_type=chan_type;
    channel_type_flags = CHANNEL_TYPE_QUICK_SEARCH ;
    device_number=device;

    setId();

#if 0
    if (channel_assigned) {
        parent->sendMessage(ANTMessage::unassignChannel(number));
    } else {
#endif
        attemptTransition(ANT_UNASSIGN_CHANNEL);
    //}
}

// close an ant channel assignment
void ANTChannel::close()
{
    emit lostInfo(number);
    lastMessage = ANTMessage();
    parent->sendMessage(ANTMessage::close(number));
    init();
}
Exemple #3
0
ANTMessage ANTMessage::setAutoCalibrate(const unsigned char channel,
                                        bool autozero)
{
    return ANTMessage(4, ANT_ACK_DATA, channel, ANT_SPORT_CALIBRATION_MESSAGE,
                                       ANT_SPORT_CALIBRATION_REQUEST_AUTOZERO_CONFIG,
                                       autozero ? ANT_SPORT_AUTOZERO_ON : ANT_SPORT_AUTOZERO_OFF);
}
Exemple #4
0
ANTMessage ANTMessage::setChannelFreq(const unsigned char channel,
                                      const unsigned char frequency)
{
    // Channel Frequency = 2400 MHz + Channel RF Frequency Number * 1.0 MHz
    // The range is 0-124 with a default value of 66
    // ANT_SPORT_FREQ = 57
    // ANT_KICKR_FREQ = 52
    return ANTMessage(2, ANT_CHANNEL_FREQUENCY, channel, frequency);
}
Exemple #5
0
ANTMessage ANTMessage::close(const unsigned char channel)
{
    return ANTMessage(1, ANT_CLOSE_CHANNEL, channel);
}
Exemple #6
0
ANTMessage ANTMessage::open(const unsigned char channel)
{
    return ANTMessage(1, ANT_OPEN_CHANNEL, channel);
}
Exemple #7
0
// see http://www.thisisant.com/images/Resources/PDF/ap2_rf_transceiver_module_errata.pdf
ANTMessage ANTMessage::ANTMessage::boostSignal(const unsigned char channel)
{
    // [A4][02][6A][XX][57][9B]
    return ANTMessage(2, 0x6A, channel, 0x57); 
                                       
}
Exemple #8
0
ANTMessage ANTMessage::requestCalibrate(const unsigned char channel)
{
    return ANTMessage(4, ANT_ACK_DATA, channel, ANT_SPORT_CALIBRATION_MESSAGE,
                                       ANT_SPORT_CALIBRATION_REQUEST_MANUALZERO);
}
Exemple #9
0
ANTMessage ANTMessage::setNetworkKey(const unsigned char net,
                                     const unsigned char *key)
{
    return ANTMessage(9, ANT_SET_NETWORK, net, key[0], key[1], key[2], key[3], key[4], key[5], key[6], key[7]);
}
Exemple #10
0
ANTMessage ANTMessage::setChannelFreq(const unsigned char channel,
                                      const unsigned char frequency)
{
    return ANTMessage(2, ANT_CHANNEL_FREQUENCY, channel, frequency);
}
Exemple #11
0
ANTMessage ANTMessage::requestMessage(const unsigned char channel,
                                      const unsigned char request)
{
    return ANTMessage(2, ANT_REQ_MESSAGE, channel, request);
}
Exemple #12
0
ANTMessage ANTMessage::setSearchTimeout(const unsigned char channel,
                                        const unsigned char timeout)
{
    return ANTMessage(2, ANT_SEARCH_TIMEOUT, channel, timeout);
}
Exemple #13
0
ANTMessage ANTMessage::unassignChannel(const unsigned char channel)
{
    return ANTMessage(1, ANT_UNASSIGN_CHANNEL, channel);
}
Exemple #14
0
ANTMessage ANTMessage::assignChannel(const unsigned char channel,
                                     const unsigned char type,
                                     const unsigned char network)
{
    return ANTMessage(3, ANT_ASSIGN_CHANNEL, channel, type, network);
}
Exemple #15
0
ANTMessage ANTMessage::resetSystem()
{
    return ANTMessage(1, ANT_SYSTEM_RESET);
}