Open trlafleur opened 5 years ago
For FancyText it appears to be working as expected. In the test_config.yaml
I set
vehicle:
type: FancyText
text: VROOM!
pallete:
text:
- 255
- 100
- 255
And this gives the appropriate color on startup:
This is being handled by FancyText.apply_config
.
for DynamicFancyText
the color will default to the value of value_color
in the config instead of the text
palette. See code here:
I really like the idea of adding units to DynamicFancyText so I'll add that.
On second thought you can get the units already without a code change by setting in the config:
val_fmt: "{} ppm"
Thanks...... for the update....the issue with my version is that the colors default, until their data value changes... also, my version allows me to set the color of each field...
~~ /) ~~~~ /) ~~ _/) ~~ _/) ~~
Tom Lafleur
On Mon, Dec 17, 2018 at 9:09 AM Nick Touran notifications@github.com wrote:
On second thought you can get the units already without a code change by setting in the config:
val_fmt: {} ppm
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/partofthething/infopanel/issues/12#issuecomment-447922093, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXCKx3frVmrp1dcm0Nxktv6n3S4eYvnks5u58-9gaJpZM4ZUygg .
I'm setting in the scene, not in the sprites... This allows the color to change by scene... so maybe my concept on how this should works is wrong??
scenes: RSF1: sprites:
- RSF1:
x: 2
y: 8
pallete:
text:
- 0
- 255
- 255
sprites:
RSF1: type: FancyText text: 'RSF-1' font_name: '5x8.bdf'
~~ /) ~~~~ /) ~~ _/) ~~ _/) ~~
Tom Lafleur
On Mon, Dec 17, 2018 at 9:07 AM Nick Touran notifications@github.com wrote:
For FancyText it appears to be working as expected. In the test_config.yaml I set
vehicle: type: FancyText text: VROOM! pallete: text:
- 255
- 100
- 255
And this gives the appropriate color on startup:
[image: screenshot from 2018-12-17 08-58-16] https://user-images.githubusercontent.com/5360219/50102577-46924480-01da-11e9-9429-2b4d05204211.png
This is being handled by FancyText.apply_config.
for DynamicFancyText the color will default to the value of value_color in the config instead of the text palette. See code here:
I really like the idea of adding units to DynamicFancyText so I'll add that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/partofthething/infopanel/issues/12#issuecomment-447921338, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXCK4iQM_Npd1kdxTJpTB9GqQ74Bv8fks5u5884gaJpZM4ZUygg .
also, you may want to change the MQTT port from 8883 to the more common values of 1883 in your documentation...
let me explain the issue with my version...
on launch, the colors are set by the defaults in the program, and NOT what I requested by the pallete:... when the first MQTT data arrives, the colors change to what I have set in pallete:...
also, I'm planning on adding your code to change color based on value limits... I did a quick try to inherit that from Duration, but there were some issues, data was overlapping on display......
sprites: Maine-CO2: type: DynamicText units: 'ppm' label: 'CO2: ' label_fmt: '{}' data_label: 'Maine/CO2' font_name: 6x9.bdf
scenes: Maine: sprites:
~~ /) ~~~~ /) ~~ _/) ~~ _/) ~~
Tom Lafleur
On Mon, Dec 17, 2018 at 9:35 AM Tom Lafleur lafleur@lafleur.us wrote:
Thanks...... for the update....the issue with my version is that the colors default, until their data value changes... also, my version allows me to set the color of each field...
~~ /) ~~~~ /)
~~ _/) ~~ _/) ~~Tom Lafleur
On Mon, Dec 17, 2018 at 9:09 AM Nick Touran notifications@github.com wrote:
On second thought you can get the units already without a code change by setting in the config:
val_fmt: {} ppm
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/partofthething/infopanel/issues/12#issuecomment-447922093, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXCKx3frVmrp1dcm0Nxktv6n3S4eYvnks5u58-9gaJpZM4ZUygg .
I did a new version of your DynamicFancyText sprite that allows the color to be in the config file... it also builds this format: label-data-units --> CO2: 234.2 ppm, all in one sprite
What happens is the color is set to the defaults from class Sprite, and it stays that way until I send an MQTT data value then it changes to the colors from the config file... what am I doing wrong???
If I remove in update_value, the if val != self.last_val:, from the program, it works correctly, as it forces a refresh...
I've also notice that fancytext may have the same issue, it only uses the default color is there a way to force the color change on setup?? thanks.....
you need to add pallete for 'units' in sprite CONF as below...