mega-20221224 and 4 digit LED display

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

mega-20221224 and 4 digit LED display

#1 Post by mackowiakp » 24 Feb 2023, 02:36

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" ?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#2 Post by Ath » 24 Feb 2023, 07:39

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.
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#3 Post by mackowiakp » 24 Feb 2023, 08:00

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.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#4 Post by mackowiakp » 25 Mar 2023, 15:03

OK, tested. Leading zero is shown when temperature is -1C to 1C

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#5 Post by mackowiakp » 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?

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.

User avatar
Andrew Mamohin
Normal user
Posts: 95
Joined: 12 Jun 2020, 08:30
Location: Belarus, Gomel
Contact:

Re: mega-20221224 and 4 digit LED display

#6 Post by Andrew Mamohin » 26 Mar 2023, 13:02

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.
Andy.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#7 Post by mackowiakp » 26 Mar 2023, 14:53

Yep, the same with %sysday% / %sysday_0% and %sysmonth% / %sysmonth_0%.
I think its a driver problem (P073_7DGT.ino).

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#8 Post by Ath » 27 Mar 2023, 21:57

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%"
Last edited by Ath on 27 Mar 2023, 22:09, edited 1 time in total.
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#9 Post by mackowiakp » 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.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#10 Post by Ath » 27 Mar 2023, 22:11

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)
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#11 Post by mackowiakp » 27 Mar 2023, 22:28

Maybe a bit different but I also tried to display the time (date) as text.
But then no colon is displayed.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#12 Post by Ath » 27 Mar 2023, 22:58

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)
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#13 Post by mackowiakp » 27 Mar 2023, 23:18

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]$ 

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#14 Post by mackowiakp » 27 Mar 2023, 23:23

Oh sorry! No "dots" but "dot"...

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#15 Post by mackowiakp » 27 Mar 2023, 23:58

THX ! Problem solved !

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#16 Post by Ath » 29 Mar 2023, 20:52

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).
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#17 Post by mackowiakp » 29 Mar 2023, 23:52

OK

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: mega-20221224 and 4 digit LED display

#18 Post by Ath » 31 Mar 2023, 18:41

mackowiakp wrote: 29 Mar 2023, 23:52OK
Latest P073 code has just been merged.
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: mega-20221224 and 4 digit LED display

#19 Post by mackowiakp » 01 Apr 2023, 00:14

Fine. Will test...

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests