New work version with additional functions
Dependencies: 4DGL-UC ConfigFile MODSERIAL mbed mbos
Fork of CDU_Mbed_35 by
Revision 11:6923bfe7e4a4, committed 2014-07-20
- Comitter:
- LvdK
- Date:
- Sun Jul 20 19:39:24 2014 +0000
- Parent:
- 10:9a5f1b389973
- Commit message:
- 3 commands added
Changed in this revision
FS2CDU_data_5.cpp | Show annotated file Show diff for this revision Revisions of this file |
USB_receive_5.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/FS2CDU_data_5.cpp Sun Jul 20 17:55:46 2014 +0000 +++ b/FS2CDU_data_5.cpp Sun Jul 20 19:39:24 2014 +0000 @@ -146,6 +146,9 @@ CDU_STATUS.exec_indicator = 0; CDU_STATUS.backlight = 0; CDU_STATUS.stby_mode = 0; + CDU_STATUS.dspy_indicator = 0; + CDU_STATUS.fail_indicator = 0; + CDU_STATUS.ofst_indicator = 0; } void read_datafields(int command_number) { @@ -524,6 +527,39 @@ break; } + case 10: // FAI command, FAIL indicator control CDU + { + // Get message indicator status: + char_pntr = comma[1] + 1; // : set char pointer to char after comma 1 + if (string_received[char_pntr] == '0' || string_received[char_pntr] == '1') + { CDU_STATUS.fail_indicator = atoi(&string_received[char_pntr]); + CDU_Status_Update = 1; + } + break; + } + + case 11: // DPY command, DISPLAY indicator control CDU + { + // Get message indicator status: + char_pntr = comma[1] + 1; // : set char pointer to char after comma 1 + if (string_received[char_pntr] == '0' || string_received[char_pntr] == '1') + { CDU_STATUS.dspy_indicator = atoi(&string_received[char_pntr]); + CDU_Status_Update = 1; + } + break; + } + + case 12: // OFS command, OFFSET indicator control CDU + { + // Get message indicator status: + char_pntr = comma[1] + 1; // : set char pointer to char after comma 1 + if (string_received[char_pntr] == '0' || string_received[char_pntr] == '1') + { CDU_STATUS.ofst_indicator = atoi(&string_received[char_pntr]); + CDU_Status_Update = 1; + } + break; + } + default: { // unknown commandnumber !
--- a/USB_receive_5.cpp Sun Jul 20 17:55:46 2014 +0000 +++ b/USB_receive_5.cpp Sun Jul 20 19:39:24 2014 +0000 @@ -23,7 +23,7 @@ #define max_commas 10 // : max. nr of possible field separating commas in a valid message string to CDU int comma[max_commas]; // : array with positions of all found commas in string_receved[] -#define max_nr_of_commands 10 // : max nr of possible FS-to-CDU commands +#define max_nr_of_commands 13 // : max nr of possible FS-to-CDU commands // Define array of pointers to possible FS-to-CDU commands with 3 characters: const char *command[max_nr_of_commands] = { "123", // : no valid CDU command nr. 0 , used for debugging only @@ -36,6 +36,9 @@ "WTX", // : command nr. 7 "ETX", // : command nr. 8 "KTX", // : command nr. 9 + "FAI", // : command nr.10 + "DPY", // : command nr.11 + "OFS", // : command nr.12 }; void collect_FSdata() {