feat(radio): add repeat option for 'RGB Led' SF (#5677)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
@@ -343,7 +343,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
x = x - 5 * FW;
|
||||
else if (func == FUNC_PLAY_TRACK)
|
||||
x = x - 3 * FW;
|
||||
else if (func == FUNC_BACKGND_MUSIC)
|
||||
else if (func == FUNC_BACKGND_MUSIC || func == FUNC_RGB_LED)
|
||||
x = x - 2 * FW;
|
||||
if (ZEXIST(cfn->play.name))
|
||||
lcdDrawSizedText(x, y, cfn->play.name, sizeof(cfn->play.name), attr);
|
||||
@@ -487,7 +487,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
|
||||
case 4:
|
||||
if (HAS_REPEAT_PARAM(func)) {
|
||||
if (func == FUNC_PLAY_SCRIPT) {
|
||||
if (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED) {
|
||||
lcdDrawText(MODEL_SPECIAL_FUNC_4TH_COLUMN_ONOFF-3, y, (CFN_PLAY_REPEAT(cfn) == 0) ? "On" : "1x", attr);
|
||||
if (active) CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn), 0, 1, eeFlags);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
|
||||
case ITEM_CUSTOM_FUNCTIONS_REPEAT:
|
||||
if (HAS_REPEAT_PARAM(func)) {
|
||||
if (func == FUNC_PLAY_SCRIPT) {
|
||||
if (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED) {
|
||||
lcdDrawText(MODEL_SPECIAL_FUNC_4TH_COLUMN+2, y, (CFN_PLAY_REPEAT(cfn) == 0) ? "On" : "1x", attr);
|
||||
if (active) CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn), 0, 1, eeFlags);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ void FunctionLineButton::refresh()
|
||||
lv_obj_clear_state(sfEnable, LV_STATE_CHECKED);
|
||||
|
||||
if (HAS_REPEAT_PARAM(func)) {
|
||||
if (func == FUNC_PLAY_SCRIPT) {
|
||||
if (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED) {
|
||||
sprintf(s, "(%s)", (CFN_PLAY_REPEAT(cfn) == 0) ? "On" : "1x");
|
||||
} else {
|
||||
sprintf(
|
||||
@@ -614,7 +614,7 @@ void FunctionEditPage::updateSpecialFunctionOneWindow()
|
||||
if (HAS_REPEAT_PARAM(func)) { // !1x 1x 1s 2s 3s ...
|
||||
line = specialFunctionOneWindow->newLine(grid);
|
||||
new StaticText(line, rect_t{}, STR_REPEAT);
|
||||
if (func == FUNC_PLAY_SCRIPT) {
|
||||
if (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED) {
|
||||
auto repeat = new Choice(line, rect_t{}, 0, 1,
|
||||
GET_DEFAULT((int8_t)CFN_PLAY_REPEAT(cfn)),
|
||||
SET_DEFAULT(CFN_PLAY_REPEAT(cfn)));
|
||||
|
||||
Reference in New Issue
Block a user