diff --git a/board/yorp/board.c b/board/yorp/board.c index 2b062171cd..388421ff29 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -169,8 +169,27 @@ int board_get_ambient_temp(int idx, int *temp_ptr) } const struct temp_sensor_t temp_sensors[] = { - {"Ambient", TEMP_SENSOR_TYPE_BOARD, board_get_ambient_temp, 0, 5}, - {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_charger_temp, 1, 1}, + { + .name = "Battery", + .type = TEMP_SENSOR_TYPE_BATTERY, + .read = charge_get_battery_temp, + .idx = 0, + .action_delay_sec = 1 + }, + { + .name = "Ambient", + .type = TEMP_SENSOR_TYPE_BOARD, + .read = board_get_ambient_temp, + .idx = 0, + .action_delay_sec = 5 + }, + { + .name = "Charger", + .type = TEMP_SENSOR_TYPE_BOARD, + .read = board_get_charger_temp, + .idx = 1, + .action_delay_sec = 1 + }, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); diff --git a/board/yorp/board.h b/board/yorp/board.h index 85fa2130c2..9cd7e65909 100644 --- a/board/yorp/board.h +++ b/board/yorp/board.h @@ -60,7 +60,8 @@ enum adc_channel { }; enum temp_sensor_id { - TEMP_SENSOR_AMBIENT = 0, + TEMP_SENSOR_BATTERY, + TEMP_SENSOR_AMBIENT, TEMP_SENSOR_CHARGER, TEMP_SENSOR_COUNT };