schreibfaul1 / ESP32-MiniWebRadio

Internetradio with ESP32, I2S DAC and SPI TFT Display with Touchpad
https://www.youtube.com/watch?v=6QbPee2583o
320 stars 78 forks source link

wishes and clarifications #82

Closed valera39 closed 2 years ago

valera39 commented 2 years ago

Can I have a small wish for a future update? :)

romulus1st commented 2 years ago

These changes solve the problem of waking up from sleep mode. Waking up is done by pressing the IR OK key.

void ir_res(uint32_t res){
    _f_irNumberSeen = false;
    if(_state != RADIO) return;
    if(_f_sleeping == true) return;
    if(res != 0){
       setStation(res);
    }
    else{
        setStation(_cur_station); // valid between 1 ... 999
    }
    return;
}
void ir_key(const char* key){

    //if(_f_sleeping) {_f_sleeping = false;  changeState(RADIO);} // awake
    if(_f_sleeping == true && key[0] != 'k') return;
    if(_f_sleeping == true && key[0] == 'k'){ //awake
        _f_sleeping = false;
        SerialPrintfln("awake");
        setTFTbrightness(pref.getUShort("brightness"));
        changeState(RADIO);
        connecttohost(_lastconnectedhost);
        showLogoAndStationName();
        showFooter();
        showHeadlineItem(RADIO);
        showHeadlineVolume(_cur_volume);
        return;
    }
valera39 commented 2 years ago

Hello @romulus1st, I applied your changes, it really works. Thank you!

schreibfaul1 commented 2 years ago

Hello everyone, I added the improvements. The digits from the IR transmitter are now also shown on the display. I had created my own character set for this, but unfortunately never activated it. image