File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Firmware/LoRaSerial_Firmware Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -707,9 +707,13 @@ void trimCommand()
707707// Show current settings in user friendly way
708708void displayParameters ()
709709{
710- for (uint8_t x = 0 ; x <= 25 ; x++)
710+ for (uint8_t x = 0 ; x <= 26 ; x++)
711711 {
712- systemPrint (" S" );
712+ if (printerEndpoint == PRINT_TO_RF)
713+ systemPrint (" R" ); // If someone is asking for our settings over RF, respond with 'R' style settings
714+ else
715+ systemPrint (" S" );
716+
713717 systemPrint (x);
714718 systemPrint (" :" );
715719
Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ const int trainWithDefaultsButtonTime = 10000; //ms press and hold before enteri
134134// uint8_t serialReceiveBuffer[512]; //Conserve RAM due to limitations
135135uint8_t serialReceiveBuffer[32 ]; // Conserve RAM due to limitations
136136#else
137- uint8_t serialReceiveBuffer[1024 * 4 ]; // Buffer up to 1s of bytes at 4k
138- uint8_t serialTransmitBuffer[1024 * 4 ]; // Buffer up to 1s of bytes at 4k
137+ uint8_t serialReceiveBuffer[1024 * 4 ]; // Bytes received from UART waiting to be RF transmitted. Buffer up to 1s of bytes at 4k
138+ uint8_t serialTransmitBuffer[1024 * 4 ]; // Bytes received from RF waiting to be printed out UART. Buffer up to 1s of bytes at 4k
139139#endif
140140
141141uint16_t txHead = 0 ;
Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ void updateRadioState()
190190 sendCommandDataPacket ();
191191 }
192192
193- printerEndpoint = PRINT_TO_SERIAL; // Once the response is received, we need to print it to serial
193+ if (availableTXCommandBytes () == 0 )
194+ printerEndpoint = PRINT_TO_SERIAL; // Once the response is received, we need to print it to serial
194195
195196 changeState (RADIO_LINKED_TRANSMITTING);
196197 }
Original file line number Diff line number Diff line change @@ -250,10 +250,12 @@ uint8_t charToHex(char a, char b)
250250 b = toupper (b);
251251
252252 if (' 0' <= a && a <= ' 9' ) a -= ' 0' ;
253- if (' A' <= a && a <= ' F' ) a = a - ' A' + 10 ;
253+ else if (' A' <= a && a <= ' F' ) a = a - ' A' + 10 ;
254+ else return 0 ;
254255
255256 if (' 0' <= b && b <= ' 9' ) b -= ' 0' ;
256- if (' A' <= b && b <= ' F' ) b = b - ' A' + 10 ;
257+ else if (' A' <= b && b <= ' F' ) b = b - ' A' + 10 ;
258+ else return 0 ;
257259
258260 return ((a << 4 ) | b);
259261}
You can’t perform that action at this time.
0 commit comments