Changed battery_unit_e enumeration values names to capital letters for consistency sake
This commit is contained in:
parent
73b0a6f2f3
commit
59a42c7309
@ -299,10 +299,10 @@ uint16_t watch_peripherals_get_battery_voltage(battery_unit_e unit)
|
||||
|
||||
switch (unit)
|
||||
{
|
||||
case battery_unit_mv:
|
||||
case BATTERY_UNIT_MV:
|
||||
return batteryVoltage < 0 ? 0 : batteryVoltage;
|
||||
break;
|
||||
case battery_unit_percent:
|
||||
case BATTERY_UNIT_PERCENT:
|
||||
return battery_voltage_to_percentage(batteryVoltage < 0 ? 0 : batteryVoltage);
|
||||
break;
|
||||
default:
|
||||
@ -450,7 +450,7 @@ bool watch_peripherals_magnetometer_init(void)
|
||||
/* Needed but UGLY */
|
||||
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");
|
||||
return false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
#ifndef WATCH_PERIPHERALS_H
|
||||
#define WATCH_PERIPHERALS_H
|
||||
|
||||
#include "lcd.h"
|
||||
#include "wm_type_def.h"
|
||||
#include "QMC5883L.h"
|
||||
@ -12,8 +13,8 @@
|
||||
|
||||
typedef enum battery_unit
|
||||
{
|
||||
battery_unit_mv = 0,
|
||||
battery_unit_percent
|
||||
BATTERY_UNIT_MV = 0,
|
||||
BATTERY_UNIT_PERCENT
|
||||
} battery_unit_e;
|
||||
|
||||
typedef enum battery_controller_status
|
||||
|
Loading…
Reference in New Issue
Block a user