how to display space before text with siekoo or special characters with dseg7

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

how to display space before text with siekoo or special characters with dseg7

#1 Post by chromo23 » 25 Mar 2021, 14:57

for my multifunctional display project i need help.
i only have colons on my displays so i can only show e.g. the temperature without decimal places. my font for that is dseg7 because it can do space so that the number is in the middle:

Code: Select all

[d2].7dtext,.[sensor#Temperature#d2.0]^
IMG_8314.JPG
IMG_8314.JPG (56.44 KiB) Viewed 4689 times
i wanted now to display the first decimal place like that:
(as a line under the degree symbol)

Code: Select all

[d2].7dtext,.[sensor#Temperature#d2.0]!
IMG_8315.JPG
IMG_8315.JPG (58.33 KiB) Viewed 4689 times
therefore i have to use siekoo....
but siekoo doesn´t know spaces so the point (that was displayed as a space in dseg7) will be displayed

What can i do?

and secondly:
how would the code look like to switch between the different signs?
something like that:

Code: Select all

if [sensor#Temperature#"use_only_the_first_decimal] <5
[d2].7dtext,.[sensor#Temperature#d2.0]^
else
[d2].7dtext,.[sensor#Temperature#d2.0]!
endif
Edit:
Siekoo does know space but not in the beginning of a text

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

Re: how to display space before text with siekoo or special characters with dseg7

#2 Post by Ath » 25 Mar 2021, 16:27

You can send an unsupported character, like Ä instead of that leading space, or enclose the string in " to prefix with a space

Code: Select all

[d2].7dtext," [sensor#Temperature#d2.0]^"
(Couldn't test atm, still at work ;))
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: how to display space before text with siekoo or special characters with dseg7

#3 Post by chromo23 » 25 Mar 2021, 16:42

Ath wrote: 25 Mar 2021, 16:27 You can send an unsupported character, like Ä instead of that leading space, or enclose the string in " to prefix with a space

Code: Select all

[d2].7dtext," [sensor#Temperature#d2.0]^"
(Couldn't test atm, still at work ;))
special characters wont work...they give something... entirely different... :)
but your code works fine! thanks a lot!!!

do you have any suggestions regarding my second problem?

Edit:
My solution:
Let,6,[sensor#Temperature]*10
Let,7,[sensor#Temperature#D2.0]*10-[int#6]
or not... :)
Last edited by chromo23 on 25 Mar 2021, 17:12, edited 2 times in total.

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

Re: how to display space before text with siekoo or special characters with dseg7

#4 Post by Ath » 25 Mar 2021, 16:55

Something like this? :

Code: Select all

  Let,1,[sensor#Temperature]*10
  Let,2,[sensor#Temperature#F]
  Let,2,[int#2]*10
  Let,3,[int#1]-[int#2]
  if [int#3] < 5
    [d2].7dtext," [sensor#Temperature#d2.0]^" // Degrees only
  else
    [d2].7dtext," [sensor#Temperature#d2.0]!" // Degrees with underline
  endif
Edit: Added #F transformation to Let,2,...
Last edited by Ath on 25 Mar 2021, 17:20, edited 1 time in total.
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: how to display space before text with siekoo or special characters with dseg7

#5 Post by chromo23 » 25 Mar 2021, 17:15

Problem is, that the integer of the temp value will still be rounded

EDIT:

It works of course:

Code: Select all

Let,6,[sensor#Temperature]*10
Let,7,[sensor#Temperature#D2.0]*10-[int#6]
But if the temp is < .5 its a negative value and else its a positive value because of the rounding
Last edited by chromo23 on 25 Mar 2021, 17:21, edited 1 time in total.

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

Re: how to display space before text with siekoo or special characters with dseg7

#6 Post by Ath » 25 Mar 2021, 17:20

Then change this line to force a semi-round-down:

Code: Select all

Let,2,[sensor#Temperature#F]
(Add the #F 'floor' transformation)
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: how to display space before text with siekoo or special characters with dseg7

#7 Post by chromo23 » 25 Mar 2021, 17:22

Ath wrote: 25 Mar 2021, 17:20 Then change this line to force a semi-round-down:

Code: Select all

Let,2,[sensor#Temperature#F]
(Add the #F 'floor' transformation)
Or so... both works.. it just depends how you use it in the if statement.
Thanks a lot!

I eventually dit it like this:

Code: Select all

Let,6,[sensor#Temperature]*10
Let,7,[int#6]-[sensor#Temperature#F]*10

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

Re: how to display space before text with siekoo or special characters with dseg7

#8 Post by Ath » 25 Mar 2021, 21:24

chromo23 wrote: 25 Mar 2021, 17:22 I eventually dit it like this:

Code: Select all

Let,6,[sensor#Temperature]*10
Let,7,[int#6]-[sensor#Temperature#F]*10
With rules, the rule 'less is better', should be applied, that's what I eventually also should have ended up with, but I mashed something up quickly ;)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests