json button mapping config

This commit is contained in:
Sebastien
2020-01-10 15:39:32 -05:00
parent 4a08f1c5c5
commit c85d2afbaf
11 changed files with 1992 additions and 1773 deletions

View File

@@ -32,14 +32,18 @@ static struct {
/****************************************************************************************
*
*/
#ifdef CONFIG_SQUEEZEAMP
static void battery_callback(TimerHandle_t xTimer) {
battery.sum += adc1_get_raw(ADC1_CHANNEL_7) / 4095. * (10+174)/10. * 1.1;
if (++battery.count == 30) {
battery.avg = battery.sum / battery.count;
battery.sum = battery.count = 0;
ESP_LOGI(TAG, "Voltage %.2fV", battery.avg);
}
}
#endif
/****************************************************************************************
*