replaces CDU_Mbed_26
Dependencies: 4DGL MODSERIAL mbed mbos
Fork of CDU_Mbed_26 by
Revision 12:7e350a27f936, committed 2014-07-20
- Comitter:
- WillemBraat
- Date:
- Sun Jul 20 20:11:24 2014 +0000
- Parent:
- 10:9a5f1b389973
- Child:
- 13:d60c746c097c
- Commit message:
- Message indicators added
Changed in this revision
--- a/FS2CDU_data_5.cpp Sun Jul 20 17:55:46 2014 +0000 +++ b/FS2CDU_data_5.cpp Sun Jul 20 20:11:24 2014 +0000 @@ -1,3 +1,4 @@ + // L. van der Kolk, ELVEDEKA, Holland // // File: FS2CDU_data_5.cpp // -- Message handling from FS to CDU -- @@ -146,6 +147,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 +528,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 ! @@ -534,7 +571,3 @@ CDU_OS.SetEvent(FS_DATA_EVENT,CDU_DSP_CSS_TASK_ID); // : set event for CDU screen update task } - - - -
--- a/USB_receive_5.cpp Sun Jul 20 17:55:46 2014 +0000 +++ b/USB_receive_5.cpp Sun Jul 20 20:11: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() { @@ -193,5 +196,4 @@ } } - - \ No newline at end of file +
--- a/keyboard2.cpp Sun Jul 20 17:55:46 2014 +0000 +++ b/keyboard2.cpp Sun Jul 20 20:11:24 2014 +0000 @@ -148,7 +148,8 @@ //nVal = 0 --> switch off backlight //nVal = 100 --> switch on backlight max - static int LightOn = 1; + static int LightOn = 1; + static int FullBright = 0; switch (nVal) {