[wip] added amplitude helper
This commit is contained in:
@@ -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] = {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "main.h"
|
||||
#include "hw_button.h"
|
||||
#include "ctrl_button.h"
|
||||
#include "ctrl_channel_button.h"
|
||||
|
||||
#define DUMMY_GPIO_Port GPIOA
|
||||
@@ -61,4 +60,9 @@ void CTRL_channelButtonsHandler(void)
|
||||
{
|
||||
buttonHandler(&channel_buttons[btn_key]);
|
||||
}
|
||||
}
|
||||
|
||||
__weak void CTRL_pushedChanBtnEvent(ButtonKey_t *key)
|
||||
{
|
||||
UNUSED(key);
|
||||
}
|
||||
@@ -12,4 +12,5 @@ typedef enum
|
||||
} HW_chanBtnName_t;
|
||||
|
||||
void CTRL_channelButtonInit(void);
|
||||
void CTRL_channelButtonsHandler(void);
|
||||
void CTRL_channelButtonsHandler(void);
|
||||
void CTRL_pushedChanBtnEvent(ButtonKey_t *key);
|
||||
Reference in New Issue
Block a user