[battery] Add 1.5V L91 battery voltage to uhf telemetry

main-solar-only
Richard Meadows 2016-01-15 20:38:17 +00:00
rodzic 8b2fd07271
commit e82a57cb34
2 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -139,11 +139,12 @@
/**
* Battery ADC
*/
#define BATTERY_ADC 0
#define BATTERY_ADC 1
#define BATTERY_ADC_PIN PIN_PA02
#define BATTERY_ADC_PINMUX PINMUX_PA02B_ADC_AIN0
#define BATTERY_ADC_CHANNEL ADC_POSITIVE_INPUT_PIN0
#define BATTERY_ADC_CHANNEL_DIV 0.3125
#define BATTERY_ADC_CHANNEL_DIV 1
/*0.3125*/
/**
* External Thermistor ADC

Wyświetl plik

@ -69,15 +69,16 @@ uint16_t format_telemetry_string(char* string, struct tracker_datapoint* dp,
/* sprintf - full string (approx 90 chars) */
len += sprintf(telemetry_string + len,
"%s,%02u:%02u:%02u,%02u%02u%02u,%02.5f,%03.5f,%ld,%u,%u,%ld,%.1f,%.1f,%.1f",
"%s,%02u:%02u:%02u,%02u%02u%02u,%02.5f,%03.5f,%ld,%u,%u,%ld,%.2f,%.1f,%.1f,%.1f",
CALLSIGN, /* 2+6+2+1=11 */
dp->time.hour, dp->time.minute, dp->time.second, /* 2+1+2+1+2+1=9 */
dp->time.year%100, dp->time.month, dp->time.day, /* 2+2+2+1=7 */
lat_fmt, lon_fmt, altitude, dp->satillite_count, /* 3+1+5+1 + 4+1+5+1 + 5+1 + 2+1 = 30 */
dp->time_to_first_fix, dp->main_pressure, /* 2+1 + 5+1 = 9 */
dp->thermistor_temperature, dp->bmp180_temperature, /* 3+1+1+1 + 3+1+1+1 = 12 */
dp->battery, dp->thermistor_temperature, /* 1+1+2+1 + 3+1+1+1 = 11 */
dp->bmp180_temperature, /* 3+1+1+1 = 6 */
dp->radio_die_temperature); /* 3+1+1+1 = 6 */
/* sum = 84 (must be less than or equal to 114) */
/* sum = 89 (must be less than or equal to 114) */
if (reduce_char_set) {
/* Reduce character set */