Page 1 of 1

mega-20221224 and 4 digit LED display

Posted: 24 Feb 2023, 02:36
by mackowiakp
I use 4 Digit LED Display with a very old version of FW.
I improved the source of this display myself because when showing the temperature, the display showed negative values as e.g. "-:2" instead of "-0:2".
So - at least for me - in a hardly legible way.
I did not analyze the mega-20221224 source, hence I have a question.
In this version and for this display negative values in the range -1C to 0C are presented as e.g. "-:2" or as "-0:2" ?

Re: mega-20221224 and 4 digit LED display

Posted: 24 Feb 2023, 07:39
by Ath
I assume you are pointing at P073, the 7-segment display.

Most likely those issues are now fixed, as quite some work has been done on that plugin in the last 2 years. Best route would be to try...
If it (still) doesn't work as expected, we can probably correct that.

Re: mega-20221224 and 4 digit LED display

Posted: 24 Feb 2023, 08:00
by mackowiakp
Yep, 7 segment LED display. Dont have at this moment test one and I dont want to test on already working unit.
Need to buy one.

Re: mega-20221224 and 4 digit LED display

Posted: 25 Mar 2023, 15:03
by mackowiakp
OK, tested. Leading zero is shown when temperature is -1C to 1C

Re: mega-20221224 and 4 digit LED display

Posted: 25 Mar 2023, 15:20
by mackowiakp
However, there is another problem.
On the 4-digit display, the hour in the range 0-9 is displayed with a leading zero.
Can this be removed somehow?

I display the time using the command:

Code: Select all

7dst,%syshour%,%sysmin%
The clock is displayed with a command because the push-on button installed switches the display to different physical values.

Re: mega-20221224 and 4 digit LED display

Posted: 26 Mar 2023, 13:02
by Andrew Mamohin
mackowiakp wrote: 25 Mar 2023, 15:20 On the 4-digit display, the hour in the range 0-9 is displayed with a leading zero.
Strange, because there are two variables (with and without it: %syshour% // %syshour_0%), but you use it without zero.

Re: mega-20221224 and 4 digit LED display

Posted: 26 Mar 2023, 14:53
by mackowiakp
Yep, the same with %sysday% / %sysday_0% and %sysmonth% / %sysmonth_0%.
I think its a driver problem (P073_7DGT.ino).

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 21:57
by Ath
mackowiakp wrote: 25 Mar 2023, 15:20 However, there is another problem.
On the 4-digit display, the hour in the range 0-9 is displayed with a leading zero.
Can this be removed somehow?
AFAICS, the hour part of the time is always displayed with a leading 0 when < 10, so changing that would be a feature request, as currently there is no way to configure that.

Edit:
That includes the 7dst command, you might want to consider using the 7dtext command like:

Code: Select all

  let,24,%syshour% // use intermediate variable to allow formatting
  7dtext,"[int#24#d2]%sysmin_0%"

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 22:08
by mackowiakp
Ok I see. Only I was a little surprised that in the version from before (probably) 5 years "0" was not displayed and now it is.
It is true that then there was a problem with "0" when displaying the temperature in the range -1C - 1C.
But I was able to change the source.

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 22:11
by Ath
mackowiakp wrote: 27 Mar 2023, 22:08 Ok I see. Only I was a little surprised that in the version from before (probably) 5 years "0" was not displayed and now it is.
It is true that then there was a problem with "0" when displaying the temperature in the range -1C - 1C.
But I was able to change the source.
The display of time, using 7dst, and temperature, using 7dt, use separate/independent formatting routines. See my edited response above for a solution (without changing the ESPEasy sources)

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 22:28
by mackowiakp
Maybe a bit different but I also tried to display the time (date) as text.
But then no colon is displayed.

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 22:58
by Ath
mackowiakp wrote: 27 Mar 2023, 22:28 But then no colon is displayed.
Enabling the Option "Text show periods as dots" should take care of that when you insert a period between the 2 parts of the date, and using the 7dtext command. (It should enable the colon on displays that have them, as those usually don't have a dot on each segment)

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 23:18
by mackowiakp
Hmmm... "Text show periods as dots" - there is no such option....

Code: Select all

[maciek@Piotr src]$ grep "Text show periods as dots" * 2>/dev/null
[maciek@Piotr src]$ 

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 23:23
by mackowiakp
Oh sorry! No "dots" but "dot"...

Re: mega-20221224 and 4 digit LED display

Posted: 27 Mar 2023, 23:58
by mackowiakp
THX ! Problem solved !

Re: mega-20221224 and 4 digit LED display

Posted: 29 Mar 2023, 20:52
by Ath
I've added optional suppressing any leading zero on Hour/Day as a feature in the plugin via PR #4577, get a test-build from this Actions run. NB: Not available in the Collection builds! (to save .bin size).

Re: mega-20221224 and 4 digit LED display

Posted: 29 Mar 2023, 23:52
by mackowiakp
OK

Re: mega-20221224 and 4 digit LED display

Posted: 31 Mar 2023, 18:41
by Ath
mackowiakp wrote: 29 Mar 2023, 23:52OK
Latest P073 code has just been merged.

Re: mega-20221224 and 4 digit LED display

Posted: 01 Apr 2023, 00:14
by mackowiakp
Fine. Will test...