mirror of https://github.com/arendst/Tasmota.git
Udisplay finegrain delay (#11894)
* uDisplay add 10ms delay and log * Silly bug Co-authored-by: Stephan Hadinger <stephan.hadinger@gmail.com>
This commit is contained in:
parent
04bbbc34d0
commit
61cecdef2f
|
@ -514,9 +514,20 @@ Renderer *uDisplay::Init(void) {
|
|||
#ifdef UDSP_DEBUG
|
||||
Serial.printf("\n");
|
||||
#endif
|
||||
if (args & 0x80) {
|
||||
if (args&0x60) delay(500);
|
||||
else delay(150);
|
||||
if (args & 0x80) { // delay after the command
|
||||
uint32_t delay_ms = 0;
|
||||
switch (args & 0xE0) {
|
||||
case 0x80: delay_ms = 150; break;
|
||||
case 0xA0: delay_ms = 10; break;
|
||||
case 0xE0: delay_ms = 500; break;
|
||||
}
|
||||
if (delay_ms > 0) {
|
||||
delay(delay_ms);
|
||||
#ifdef UDSP_DEBUG
|
||||
Serial.printf("delay %d ms\n", delay_ms);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
if (index >= dsp_ncmds) break;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
:H,ST7789,240,240,16,SPI,1,*,*,*,*,*,*,*,40
|
||||
:S,2,1,3,0,80,30
|
||||
:I
|
||||
|
@ -17,6 +16,6 @@
|
|||
:1,A0,50,00,01
|
||||
:2,00,00,00,02
|
||||
:3,60,00,00,03
|
||||
i:20,21
|
||||
:i,20,21
|
||||
:TI2,38,32,23
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue