Piezo 측정 중에는 배터리/온도 저전압 체크가 동작하지 않도록 가드 추가
- battery_loop()에서 maa_async_is_busy()면 return - safety_check_complete()에서도 MAA 중이면 dr_piezo_power_off() 안 하고 return
This commit is contained in:
@@ -90,6 +90,7 @@ extern bool go_batt;
|
||||
extern bool motion_raw_data_enabled;
|
||||
extern bool ble_got_new_data;
|
||||
extern bool motion_data_once;
|
||||
extern bool maa_async_is_busy(void);
|
||||
|
||||
/*==============================================================================
|
||||
* safety_check_complete - Called by tmp235 handler after temperature measurement
|
||||
@@ -102,6 +103,11 @@ void safety_check_complete(float temp_c)
|
||||
//DBG_PRINTF("[SAFETY] Batt=%d mV, Temp=%d.%d C\r\n",
|
||||
// (int)safety_batt_mv, (int)temp_c, ((int)(temp_c * 10)) % 10);
|
||||
|
||||
if (maa_async_is_busy())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Battery check */
|
||||
if (safety_batt_mv <= LOW_BATTERY_VOLTAGE)
|
||||
{
|
||||
@@ -268,6 +274,10 @@ void battery_loop(void * p_context)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (maa_async_is_busy())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
low_battery_check = true;
|
||||
battery_level_meas();
|
||||
|
||||
Reference in New Issue
Block a user