piezo power on 이전에 maa busy flag 먼저 세트
- piezo power on delay 10ms 존재 - Piezo 측정 중에는 배터리/온도 저전압 체크가 동작하지 않도록 하기 위함
This commit is contained in:
@@ -283,11 +283,6 @@ int Cmd_maa(const ParsedCmd *cmd)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dr_piezo_is_power_on())
|
|
||||||
{
|
|
||||||
dr_piezo_power_on();
|
|
||||||
}
|
|
||||||
|
|
||||||
err = maa_async_start(
|
err = maa_async_start(
|
||||||
m_config.piezo_freq_option,
|
m_config.piezo_freq_option,
|
||||||
m_config.piezo_delay_us,
|
m_config.piezo_delay_us,
|
||||||
@@ -340,11 +335,6 @@ int Cmd_mbb(const ParsedCmd *cmd)
|
|||||||
|
|
||||||
maa_async_set_pre_capture_all(true);
|
maa_async_set_pre_capture_all(true);
|
||||||
|
|
||||||
if (!dr_piezo_is_power_on())
|
|
||||||
{
|
|
||||||
dr_piezo_power_on();
|
|
||||||
}
|
|
||||||
|
|
||||||
err = maa_async_start(
|
err = maa_async_start(
|
||||||
m_config.piezo_freq_option,
|
m_config.piezo_freq_option,
|
||||||
m_config.piezo_delay_us,
|
m_config.piezo_delay_us,
|
||||||
@@ -396,11 +386,6 @@ int Cmd_mtb(const ParsedCmd *cmd)
|
|||||||
|
|
||||||
maa_async_set_pre_capture_all(true);
|
maa_async_set_pre_capture_all(true);
|
||||||
|
|
||||||
if (!dr_piezo_is_power_on())
|
|
||||||
{
|
|
||||||
dr_piezo_power_on();
|
|
||||||
}
|
|
||||||
|
|
||||||
err = maa_async_start(
|
err = maa_async_start(
|
||||||
m_config.piezo_freq_option,
|
m_config.piezo_freq_option,
|
||||||
m_config.piezo_delay_us,
|
m_config.piezo_delay_us,
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ extern void dr_piezo_burst_sw_20mhz(uint8_t cycles);
|
|||||||
extern void dr_piezo_burst_sw_17mhz(uint8_t cycles);
|
extern void dr_piezo_burst_sw_17mhz(uint8_t cycles);
|
||||||
extern void dr_piezo_burst_sw_22mhz(uint8_t cycles);
|
extern void dr_piezo_burst_sw_22mhz(uint8_t cycles);
|
||||||
extern void dr_piezo_burst_sw_19mhz(uint8_t cycles);
|
extern void dr_piezo_burst_sw_19mhz(uint8_t cycles);
|
||||||
|
extern void dr_piezo_power_on(void);
|
||||||
extern void dr_piezo_power_off(void);
|
extern void dr_piezo_power_off(void);
|
||||||
|
extern bool dr_piezo_is_power_on(void);
|
||||||
|
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
@@ -1380,6 +1382,11 @@ dr_adc_err_t maa_async_start(uint8_t freq_option, uint16_t delay_us, uint16_t nu
|
|||||||
/* capture all channels without BLE TX, then start transmission */
|
/* capture all channels without BLE TX, then start transmission */
|
||||||
g_maa_ctx.state = MAA_ASYNC_CAPTURING;
|
g_maa_ctx.state = MAA_ASYNC_CAPTURING;
|
||||||
|
|
||||||
|
if (!dr_piezo_is_power_on())
|
||||||
|
{
|
||||||
|
dr_piezo_power_on();
|
||||||
|
}
|
||||||
|
|
||||||
/* Warm up CH0 before real capture (MAA_ASYNC_WARMUP_COUNT). */
|
/* Warm up CH0 before real capture (MAA_ASYNC_WARMUP_COUNT). */
|
||||||
for (uint8_t warmup = 0; warmup < MAA_ASYNC_WARMUP_COUNT; warmup++)
|
for (uint8_t warmup = 0; warmup < MAA_ASYNC_WARMUP_COUNT; warmup++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user