clean up example lineendings
This commit is contained in:
@@ -266,12 +266,12 @@ void handle_disconnect(wiimote* wm) {
|
|||||||
printf("\n\n--- DISCONNECTED [wiimote id %i] ---\n", wm->unid);
|
printf("\n\n--- DISCONNECTED [wiimote id %i] ---\n", wm->unid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void test(struct wiimote_t* wm, byte* data, unsigned short len) {
|
void test(struct wiimote_t* wm, byte* data, unsigned short len) {
|
||||||
printf("test: %i [%x %x %x %x]\n", len, data[0], data[1], data[2], data[3]);
|
printf("test: %i [%x %x %x %x]\n", len, data[0], data[1], data[2], data[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief main()
|
* @brief main()
|
||||||
@@ -355,7 +355,7 @@ int main(int argc, char** argv) {
|
|||||||
* what LEDs are lit.
|
* what LEDs are lit.
|
||||||
*/
|
*/
|
||||||
//wiiuse_status(wiimotes[0]);
|
//wiiuse_status(wiimotes[0]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the main loop
|
* This is the main loop
|
||||||
*
|
*
|
||||||
@@ -364,7 +364,7 @@ int main(int argc, char** argv) {
|
|||||||
* (it doesn't matter if some of those wiimotes are not used
|
* (it doesn't matter if some of those wiimotes are not used
|
||||||
* or are not connected).
|
* or are not connected).
|
||||||
*
|
*
|
||||||
* This function will set the event flag for each wiimote
|
* This function will set the event flag for each wiimote
|
||||||
* when the wiimote has things to report.
|
* when the wiimote has things to report.
|
||||||
*/
|
*/
|
||||||
while (1) {
|
while (1) {
|
||||||
@@ -386,20 +386,20 @@ int main(int argc, char** argv) {
|
|||||||
handle_ctrl_status(wiimotes[i]);
|
handle_ctrl_status(wiimotes[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIIUSE_DISCONNECT:
|
case WIIUSE_DISCONNECT:
|
||||||
case WIIUSE_UNEXPECTED_DISCONNECT:
|
case WIIUSE_UNEXPECTED_DISCONNECT:
|
||||||
/* the wiimote disconnected */
|
/* the wiimote disconnected */
|
||||||
handle_disconnect(wiimotes[i]);
|
handle_disconnect(wiimotes[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIIUSE_READ_DATA:
|
case WIIUSE_READ_DATA:
|
||||||
/*
|
/*
|
||||||
* Data we requested to read was returned.
|
* Data we requested to read was returned.
|
||||||
* Take a look at wiimotes[i]->read_req
|
* Take a look at wiimotes[i]->read_req
|
||||||
* for the data.
|
* for the data.
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIIUSE_NUNCHUK_INSERTED:
|
case WIIUSE_NUNCHUK_INSERTED:
|
||||||
/*
|
/*
|
||||||
* a nunchuk was inserted
|
* a nunchuk was inserted
|
||||||
@@ -408,14 +408,14 @@ int main(int argc, char** argv) {
|
|||||||
* as the wiimote.
|
* as the wiimote.
|
||||||
*/
|
*/
|
||||||
//wiiuse_set_nunchuk_orient_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 90.0f);
|
//wiiuse_set_nunchuk_orient_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 90.0f);
|
||||||
//wiiuse_set_nunchuk_accel_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 100);
|
//wiiuse_set_nunchuk_accel_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 100);
|
||||||
printf("Nunchuk inserted.\n");
|
printf("Nunchuk inserted.\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WIIUSE_CLASSIC_CTRL_INSERTED:
|
||||||
|
printf("Classic controller inserted.\n");
|
||||||
|
break;
|
||||||
|
|
||||||
case WIIUSE_CLASSIC_CTRL_INSERTED:
|
|
||||||
printf("Classic controller inserted.\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WIIUSE_WII_BOARD_CTRL_INSERTED:
|
case WIIUSE_WII_BOARD_CTRL_INSERTED:
|
||||||
printf("Balance board controller inserted.\n");
|
printf("Balance board controller inserted.\n");
|
||||||
break;
|
break;
|
||||||
@@ -423,8 +423,8 @@ int main(int argc, char** argv) {
|
|||||||
case WIIUSE_GUITAR_HERO_3_CTRL_INSERTED:
|
case WIIUSE_GUITAR_HERO_3_CTRL_INSERTED:
|
||||||
/* some expansion was inserted */
|
/* some expansion was inserted */
|
||||||
handle_ctrl_status(wiimotes[i]);
|
handle_ctrl_status(wiimotes[i]);
|
||||||
printf("Guitar Hero 3 controller inserted.\n");
|
printf("Guitar Hero 3 controller inserted.\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIIUSE_NUNCHUK_REMOVED:
|
case WIIUSE_NUNCHUK_REMOVED:
|
||||||
case WIIUSE_CLASSIC_CTRL_REMOVED:
|
case WIIUSE_CLASSIC_CTRL_REMOVED:
|
||||||
|
|||||||
Reference in New Issue
Block a user