[wip] added amplitude helper

This commit is contained in:
2023-04-01 23:23:14 +02:00
parent 07dd185e7c
commit 45ef68b74d
4 changed files with 66 additions and 61 deletions

View File

@@ -232,6 +232,24 @@ static void _moveToRighttFocusFreqNumber(void)
}
static void _setTo0_01xFocusNumber(void)
{
switch (_app_data->curr_state_lay)
{
case LAY_AMPL:
_app_data->ampl_focus_digit = 0;
break;
case LAY_OFFS:
_app_data->offs_focus_digit = 0;
break;
default:
break;
}
_app_data->timer_blink[last_key] = 2;
_app_data->isButtonBlink |= (1 << last_key);
_app_data->isValueChange = 1;
}
static void _setTo0_1xFocusNumber(void)
{
switch (_app_data->curr_state_lay)
{
@@ -247,39 +265,23 @@ static void _setTo0_01xFocusNumber(void)
_app_data->timer_blink[last_key] = 2;
_app_data->isButtonBlink |= (1 << last_key);
}
static void _setTo0_1xFocusNumber(void)
{
switch (_app_data->curr_state_lay)
{
case LAY_AMPL:
_app_data->ampl_focus_digit = 10;
break;
case LAY_OFFS:
_app_data->offs_focus_digit = 10;
break;
default:
break;
}
_app_data->timer_blink[last_key] = 2;
_app_data->isButtonBlink |= (1 << last_key);
_app_data->isValueChange = 1;
}
static void _setTo1xFocusNumber(void)
{
switch (_app_data->curr_state_lay)
{
case LAY_AMPL:
_app_data->ampl_focus_digit = 10;
_app_data->ampl_focus_digit = 2;
break;
case LAY_OFFS:
_app_data->offs_focus_digit = 10;
_app_data->offs_focus_digit = 2;
break;
case LAY_PHAS:
_app_data->offs_focus_digit = 1;
_app_data->offs_focus_digit = 0;
break;
case LAY_DUTY:
_app_data->offs_focus_digit = 1;
_app_data->offs_focus_digit = 0;
break;
default:
break;
@@ -287,22 +289,23 @@ static void _setTo1xFocusNumber(void)
_app_data->timer_blink[last_key] = 2;
_app_data->isButtonBlink |= (1 << last_key);
_app_data->isValueChange = 1;
}
static void _setTo10xFocusNumber(void)
{
switch (_app_data->curr_state_lay)
{
case LAY_AMPL:
_app_data->ampl_focus_digit = 100;
_app_data->ampl_focus_digit = 3;
break;
case LAY_OFFS:
_app_data->offs_focus_digit = 100;
_app_data->offs_focus_digit = 3;
break;
case LAY_PHAS:
_app_data->offs_focus_digit = 10;
_app_data->offs_focus_digit = 1;
break;
case LAY_DUTY:
_app_data->offs_focus_digit = 10;
_app_data->offs_focus_digit = 1;
break;
default:
break;
@@ -310,6 +313,7 @@ static void _setTo10xFocusNumber(void)
_app_data->timer_blink[last_key] = 2;
_app_data->isButtonBlink |= (1 << last_key);
_app_data->isValueChange = 1;
}
static const CMD_button_t btn_command[BTN_STATE_MAX][DISP_BTN_MAX] = {