xcode/myo.cpp
// This is a utility function implemented for this sample that maps a myo::Myo* to a unique ID starting at 1.
// It does so by looking for the Myo pointer in knownMyos, which onPair() adds each Myo into as it is paired.
This is a utility function implemented for this sample that maps a myo::Myo* to a unique ID starting at 1.
It does so by looking for the Myo pointer in knownMyos, which onPair() adds each Myo into as it is paired.
This is a utility function implemented for this sample that maps a myo :: Myo * to a unique ID starting at 1 . It does so by looking for the Myo pointer in knownMyos which onPair () adds each Myo into as it is paired .
size_t TheMyo::identifyMyo(myo::Myo* myo) {
    for (size_t i = 0; i < knownMyos.size(); ++i) {
        if (knownMyos[i] == myo) {
            return i + 1;
        }
    }
    return 0;
}
size_t TheMyo :: identifyMyo ( myo :: Myo * myo ) { for ( size_t i = 0 ; i < knownMyos . size ( ) ; ++ i ) { if ( knownMyos [ i ] == myo ) { return i + 1 ; } } return 0 ; }
This is a utility function implemented for this sample that maps a myo::Myo* to a unique ID starting at 1.
This is a utility function implemented for this sample that maps a myo :: Myo * to a unique ID starting at 1 .
// Walk through the list of Myo devices that we've seen pairing events for. // If two Myo pointers compare equal, they refer to the same Myo device.