Skip to content

Commit 3fedab6

Browse files
committed
IR enhanced
1 parent c0291cf commit 3fedab6

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

src/index.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* index.h
33
*
44
* Created on: 04.10.2018
5-
* Updated on: 17.11.2024
5+
* Updated on: 18.11.2024
66
* Author: Wolle
77
*
88
* successfully tested with Chrome and Firefox
@@ -2967,7 +2967,7 @@ function clear_BT_memItems(){
29672967
<td class="table_cell2"> ARROW RIGHT </td>
29682968
<td> 21 </td>
29692969
<td> <input type="text" class="boxstyle_s" id="ir_command_21" onclick="IRclick(21)" onkeyup="chIRcmd(21)" onchange="IRupdateJSON(21)"></td>
2970-
<td class="table_cell2"> - </td>
2970+
<td class="table_cell2"> RADIO </td>
29712971
<td> 31 </td>
29722972
<td> <input type="text" class="boxstyle_s" id="ir_command_31" onclick="IRclick(31)" onkeyup="chIRcmd(31)" onchange="IRupdateJSON(31)"></td>
29732973
<td class="table_cell2"> CANCEL </td>
@@ -2982,7 +2982,7 @@ function clear_BT_memItems(){
29822982
<td class="table_cell2"> ARROW LEFT </td>
29832983
<td> 22 </td>
29842984
<td> <input type="text" class="boxstyle_s" id="ir_command_22" onclick="IRclick(22)" onkeyup="chIRcmd(22)" onchange="IRupdateJSON(22)"></td>
2985-
<td class="table_cell2"> - </td>
2985+
<td class="table_cell2"> PLAYER </td>
29862986
<td> 32 </td>
29872987
<td> <input type="text" class="boxstyle_s" id="ir_command_32" onclick="IRclick(32)" onkeyup="chIRcmd(32)" onchange="IRupdateJSON(32)"></td>
29882988
<td class="table_cell2"> - </td>
@@ -2997,7 +2997,7 @@ function clear_BT_memItems(){
29972997
<td class="table_cell2"> ARROW DOWN </td>
29982998
<td> 23 </td>
29992999
<td> <input type="text" class="boxstyle_s" id="ir_command_23" onclick="IRclick(23)" onkeyup="chIRcmd(23)" onchange="IRupdateJSON(23)"></td>
3000-
<td class="table_cell2"> - </td>
3000+
<td class="table_cell2"> DLNA </td>
30013001
<td></td>
30023002
<td></td>
30033003
<td></td>
@@ -3011,8 +3011,8 @@ function clear_BT_memItems(){
30113011
<td> <input type="text" class="boxstyle_s" id="ir_command_14" onclick="IRclick(14)" onkeyup="chIRcmd(14)" onchange="IRupdateJSON(14)"></td>
30123012
<td class="table_cell2"> ARROW UP </td>
30133013
<td> 24 </td>
3014-
<td> <input type="text" class="boxstyle_s" id="ir_command_24" onclick="IRclick(14)" onkeyup="chIRcmd(24)" onchange="IRupdateJSON(24)"></td>
3015-
<td class="table_cell2"> - </td>
3014+
<td> <input type="text" class="boxstyle_s" id="ir_command_24" onclick="IRclick(24)" onkeyup="chIRcmd(24)" onchange="IRupdateJSON(24)"></td>
3015+
<td class="table_cell2"> CLOCK </td>
30163016
<td></td>
30173017
<td></td>
30183018
<td></td>
@@ -3026,8 +3026,8 @@ function clear_BT_memItems(){
30263026
<td> <input type="text" class="boxstyle_s" id="ir_command_15" onclick="IRclick(15)" onkeyup="chIRcmd(15)" onchange="IRupdateJSON(15)"></td>
30273027
<td class="table_cell2"> MODE </td>
30283028
<td> 25 </td>
3029-
<td> <input type="text" class="boxstyle_s" id="ir_command_25" onclick="IRclick(15)" onkeyup="chIRcmd(25)" onchange="IRupdateJSON(25)"></td>
3030-
<td class="table_cell2"> - </td>
3029+
<td> <input type="text" class="boxstyle_s" id="ir_command_25" onclick="IRclick(25)" onkeyup="chIRcmd(25)" onchange="IRupdateJSON(25)"></td>
3030+
<td class="table_cell2"> OFF TIMER </td>
30313031
<td></td>
30323032
<td></td>
30333033
<td></td>
@@ -3041,7 +3041,7 @@ function clear_BT_memItems(){
30413041
<td> <input type="text" class="boxstyle_s" id="ir_command_16" onclick="IRclick(16)" onkeyup="chIRcmd(16)" onchange="IRupdateJSON(16)"></td>
30423042
<td class="table_cell2"> OK </td>
30433043
<td> 26 </td>
3044-
<td> <input type="text" class="boxstyle_s" id="ir_command_26" onclick="IRclick(16)" onkeyup="chIRcmd(26)" onchange="IRupdateJSON(26)"></td>
3044+
<td> <input type="text" class="boxstyle_s" id="ir_command_26" onclick="IRclick(26)" onkeyup="chIRcmd(26)" onchange="IRupdateJSON(26)"></td>
30453045
<td class="table_cell2"> - </td>
30463046
<td></td>
30473047
<td></td>
@@ -3069,10 +3069,10 @@ function clear_BT_memItems(){
30693069
<td class="table_cell1"> EIGHT </td>
30703070
<td> 18 </td>
30713071
<td> <input type="text" class="boxstyle_s" id="ir_command_18" onclick="IRclick(18)" onkeyup="chIRcmd(18)" onchange="IRupdateJSON(18)"></td>
3072-
<td class="table_cell2"> - </td>
3072+
<td class="table_cell2"> PAUSE/RESUME </td>
30733073
<td> 28 </td>
30743074
<td> <input type="text" class="boxstyle_s" id="ir_command_28" onclick="IRclick(28)" onkeyup="chIRcmd(28)" onchange="IRupdateJSON(28)"></td>
3075-
<td class="table_cell2"> - </td>
3075+
<td class="table_cell2"> << 30s </td>
30763076
<td></td>
30773077
<td></td>
30783078
<td></td>
@@ -3084,10 +3084,10 @@ function clear_BT_memItems(){
30843084
<td class="table_cell1"> NINE </td>
30853085
<td> 19 </td>
30863086
<td> <input type="text" class="boxstyle_s" id="ir_command_19" onclick="IRclick(19)" onkeyup="chIRcmd(19)" onchange="IRupdateJSON(19)"></td>
3087-
<td class="table_cell2"> - </td>
3087+
<td class="table_cell2"> STOP </td>
30883088
<td> 29 </td>
30893089
<td> <input type="text" class="boxstyle_s" id="ir_command_29" onclick="IRclick(29)" onkeyup="chIRcmd(29)" onchange="IRupdateJSON(29)"></td>
3090-
<td class="table_cell2"> - </td>
3090+
<td class="table_cell2"> >> 30s </td>
30913091
<td></td>
30923092
<td></td>
30933093
<td></td>

src/main.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
MiniWebRadio -- Webradio receiver for ESP32
55
66
first release on 03/2017 */String Version ="\
7-
Version 3.5z - Nov 17/2024 ";
7+
Version 3.5.1 - Nov 18/2024 ";
88

99
/* 2.8" color display (320x240px) with controller ILI9341 or HX8347D (SPI) or
1010
3.5" color display (480x320px) with controller ILI9486 or ILI9488 (SPI)
@@ -3006,6 +3006,7 @@ void ir_short_key(uint8_t key) {
30063006
wake_up();
30073007
return;
30083008
}
3009+
if(_f_irOnOff == true && key != 20) return;
30093010
if(_state == IR_SETTINGS) return; // nothing todo
30103011

30113012
switch(key) {
@@ -3060,10 +3061,19 @@ void ir_short_key(uint8_t key) {
30603061
if(_state == AUDIOFILESLIST) {const char* r = lst_PLAYER.getSelectedFile(); if(r){connecttoFS("SD_MMC", r); _playerSubmenue = 1; changeState(PLAYER);} break;}
30613062
if(_state == SLEEPTIMER) {dispFooter.updateOffTime(_sleeptime); _radioSubmenue = 0; changeState(RADIO); break;}
30623063
break;
3064+
case 18: if(_state == PLAYER){if(_f_isFSConnected) audio.pauseResume();} break;
3065+
case 19: if(_state == PLAYER){if(_f_isFSConnected) audio.stopSong(); _playerSubmenue = 0; changeState(PLAYER);} break;
30633066
case 20: _f_irOnOff = ! _f_irOnOff;
30643067
if(_f_irOnOff) fall_asleep();
30653068
else wake_up();
30663069
break;
3070+
case 21: if(_state != RADIO) {changeState(RADIO);} break;
3071+
case 22: if(_state != PLAYER) {_playerSubmenue = 0; changeState(PLAYER);} break;
3072+
case 23: if(_state != DLNA) {changeState(DLNA);} break;
3073+
case 24: if(_state != CLOCK) {changeState(CLOCK);} break;
3074+
case 25: if(_state != SLEEPTIMER) {changeState(SLEEPTIMER);} break;
3075+
case 28: if(_state == PLAYER) {if(audio.isRunning()) audio.setTimeOffset(-30);} break;
3076+
case 29: if(_state == PLAYER) {if(audio.isRunning()) audio.setTimeOffset(+30);} break;
30673077
default: break;
30683078
}
30693079
}

0 commit comments

Comments
 (0)