Send optional ADC2 measurement to 1284p
This commit is contained in:
parent
4576b7b671
commit
e4ec444611
1 changed files with 10 additions and 0 deletions
|
@ -400,6 +400,9 @@ menu_stop_temp(void)
|
|||
/**
|
||||
* \brief This will send the data via the serial port.
|
||||
*/
|
||||
#if MEASURE_ADC2
|
||||
extern uint16_t ADC2_reading;
|
||||
#endif
|
||||
void
|
||||
menu_send_temp(void)
|
||||
{
|
||||
|
@ -419,6 +422,13 @@ menu_send_temp(void)
|
|||
/* Send frame via serial port. */
|
||||
uart_serial_send_frame(SEND_TEMP, 1+strlen((char *)p), p);
|
||||
|
||||
#if MEASURE_ADC2
|
||||
/* Send ADC2 via serial port. */
|
||||
p = signed_dectoascii(ADC2_reading, (str + 10));
|
||||
str[9]='m';str[10]='V';str[11]=0; //convert degrees to millivolts ;)
|
||||
uart_serial_send_frame(SEND_ADC2, 1+strlen((char *)p), p);
|
||||
#endif
|
||||
|
||||
led_off();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue