Changed battery_unit_e enumeration values names to capital letters for consistency sake

This commit is contained in:
anschrammh 2023-10-19 08:03:02 +02:00
parent 73b0a6f2f3
commit 59a42c7309
2 changed files with 6 additions and 5 deletions

View File

@ -299,10 +299,10 @@ uint16_t watch_peripherals_get_battery_voltage(battery_unit_e unit)
switch (unit) switch (unit)
{ {
case battery_unit_mv: case BATTERY_UNIT_MV:
return batteryVoltage < 0 ? 0 : batteryVoltage; return batteryVoltage < 0 ? 0 : batteryVoltage;
break; break;
case battery_unit_percent: case BATTERY_UNIT_PERCENT:
return battery_voltage_to_percentage(batteryVoltage < 0 ? 0 : batteryVoltage); return battery_voltage_to_percentage(batteryVoltage < 0 ? 0 : batteryVoltage);
break; break;
default: default:
@ -450,7 +450,7 @@ bool watch_peripherals_magnetometer_init(void)
/* Needed but UGLY */ /* Needed but UGLY */
tls_os_time_delay(2); tls_os_time_delay(2);
if(!QMC5883L_set_power_mode(QMC5883L_Mode_Control_Continuous)) if(!QMC5883L_set_power_mode(QMC5883L_Mode_Control_Standby))
{ {
APP_LOG_ERROR("Failed to set QMC5883L mode"); APP_LOG_ERROR("Failed to set QMC5883L mode");
return false; return false;

View File

@ -4,6 +4,7 @@
*/ */
#ifndef WATCH_PERIPHERALS_H #ifndef WATCH_PERIPHERALS_H
#define WATCH_PERIPHERALS_H #define WATCH_PERIPHERALS_H
#include "lcd.h" #include "lcd.h"
#include "wm_type_def.h" #include "wm_type_def.h"
#include "QMC5883L.h" #include "QMC5883L.h"
@ -12,8 +13,8 @@
typedef enum battery_unit typedef enum battery_unit
{ {
battery_unit_mv = 0, BATTERY_UNIT_MV = 0,
battery_unit_percent BATTERY_UNIT_PERCENT
} battery_unit_e; } battery_unit_e;
typedef enum battery_controller_status typedef enum battery_controller_status