示例#1
0
void HandleStatus(CWiimote &wm)
{
  printf("\n");
  printf("--- CONTROLLER STATUS [wiimote id %i] ---\n\n", wm.GetID());

  printf("attachment: %i\n", wm.ExpansionDevice.GetType());
  printf("speaker: %i\n", wm.isUsingSpeaker());
  printf("ir: %i\n", wm.isUsingIR());
  printf("leds: %i %i %i %i\n", wm.isLEDSet(1), wm.isLEDSet(2), wm.isLEDSet(3), wm.isLEDSet(4));
  printf("battery: %f %%\n", wm.GetBatteryLevel());
}
void WiimoteInputManager::handleStatus(CWiimote &wiimote, unsigned int controllerNumber)
{
    std::cout << "Wiimote Status for Wiimote: " << controllerNumber << std::endl;
    std::cout << "battery level: " << wiimote.GetBatteryLevel() << "%" << std::endl;
}