Replies: 4 comments 2 replies
-
Hi Ian, The checkbox value should be automatically stored in a file if you set a config_path:
then, you can access the value at runtime by calling |
Beta Was this translation helpful? Give feedback.
-
Hi Matti
Thanks for your prompt reply. How do you save the value and reload after
reboot?
Regards
Ian
…On Wed, 20 Nov 2024 at 08:39, Matti Airas ***@***.***> wrote:
Hi Ian,
The checkbox value should be automatically stored in a file if you set a
config_path:
auto my_checkbox = new CheckboxConfig(false, "My checkbox", "/my_checkbox");
then, you can access the value at runtime by calling
my_checkbox->get_value(). A CheckboxConfig itself isn't a producer, so
you can't connect to it to get its value automatically when it changes.
There is a PersistingObservableValue that can do that, if you need it. I
think it renders bools as checkboxes as well.
—
Reply to this email directly, view it on GitHub
<#792 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH3VGY4OAV7PCEG3MFG7CHL2BRDEBAVCNFSM6AAAAABSCUF4S2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZRHE2TAOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks, I now have it working. Is there a way to get the connection status !
Regards
Ian
…On Wed, 20 Nov 2024 at 08:39, Matti Airas ***@***.***> wrote:
Hi Ian,
The checkbox value should be automatically stored in a file if you set a config_path:
auto my_checkbox = new CheckboxConfig(false, "My checkbox", "/my_checkbox");
then, you can access the value at runtime by calling my_checkbox->get_value(). A CheckboxConfig itself isn't a producer, so you can't connect to it to get its value automatically when it changes. There is a PersistingObservableValue that can do that, if you need it. I think it renders bools as checkboxes as well.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks, i just wanted to put an indicator on the lcd screen when it has
connected to the signalk server
…On Wed, 20 Nov 2024 at 14:12, Matti Airas ***@***.***> wrote:
Connect to SystemStatusController. It produces an enum whenever the SK or
WiFi connection status changes. (Although, if you'd be only interested in
WiFi status, you might prefer registering a native Arduino Wifi.onEvent
callback.)
—
Reply to this email directly, view it on GitHub
<#792 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH3VGY6YUP5ST3FITVWUXL32BSKD7AVCNFSM6AAAAABSCUF4S2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZSGM2DGMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi
I am looking for some sample code to help me with the UI. I have managed to create a checkbox using CheckboxConfig which appears on the device webpage however I can't figure out how to store the value and retrieve it when the device reboots. Also how to access the value when the device is running and connected to the signalK server.
Any help would be greatly appreciated
Thanks
Ian
Beta Was this translation helpful? Give feedback.
All reactions