Revision 1272
Added "interactive" command in server mode
Moved hardware_init out of interactive_main
Made calling interactive_main/server_main more consistent
comm_server.c | ||
---|---|---|
6 | 6 |
#include "global.h" |
7 | 7 |
#include "tests.h" |
8 | 8 |
|
9 |
#include "comm_interactive.h" |
|
10 |
|
|
9 | 11 |
// ############## |
10 | 12 |
// ## Settings ## |
11 | 13 |
// ############## |
... | ... | |
33 | 35 |
const char command_emitter [] PROGMEM = "emitter" ; |
34 | 36 |
const char command_detector [] PROGMEM = "detector" ; |
35 | 37 |
const char command_help [] PROGMEM = "help" ; |
38 |
const char command_interactive [] PROGMEM = "interactive"; |
|
39 |
const char command_i [] PROGMEM = "i" ; |
|
36 | 40 |
|
37 | 41 |
// Help |
38 | 42 |
const char help_text [] PROGMEM = |
... | ... | |
287 | 291 |
#endif |
288 | 292 |
|
289 | 293 |
bool handled=false; |
290 |
if (serial_match (command_ping , message)) { handle_message_ping (message); handled=true; } |
|
291 |
if (serial_match (command_start_test, message)) { handle_message_start_test (message); handled=true; } |
|
292 |
if (serial_match (command_help , message)) { handle_message_help (message); handled=true; } |
|
294 |
if (serial_match (command_ping , message)) { handle_message_ping (message); handled=true; } |
|
295 |
if (serial_match (command_start_test , message)) { handle_message_start_test (message); handled=true; } |
|
296 |
if (serial_match (command_help , message)) { handle_message_help (message); handled=true; } |
|
297 |
if (serial_match (command_interactive, message)) { interactive_main () ; handled=true; } |
|
298 |
if (serial_match (command_i , message)) { interactive_main () ; handled=true; } |
|
293 | 299 |
// More messages go here |
294 | 300 |
|
295 | 301 |
if (!handled) |
... | ... | |
334 | 340 |
uint8_t c; |
335 | 341 |
uint8_t buffer_fill=0; |
336 | 342 |
|
343 |
// Set the orbs to green/yellow |
|
344 |
orbs_set (0,255,0, 255,127,0); |
|
345 |
|
|
337 | 346 |
//byte_transmission_test (); // Does not return |
338 | 347 |
|
339 | 348 |
usb_puts (NL); |
Also available in: Unified diff