%v1% value not save

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sacy80
New user
Posts: 2
Joined: 24 Dec 2020, 12:29

%v1% value not save

#1 Post by sacy80 » 31 Dec 2020, 17:27

Hi,

I have encouter issue, base on doc, using let,1,value will store as non-volatile.. and dummy var , but when power remove and power on or reboot.. everything are clear to zero.

code:
On System#Boot do
if [dim01#Counter] = 0
#TaskValueSet,4,1,%v1%
#pwm,14,[dummy#d1],0,22000
TaskValueSet,3,1,%v2%
endif
endon

on dim01#Counter do
TaskValueSet,4,1,[dim01#Counter]*1023/93 //scaling (i have my scaling in device setting for encoder as 1 to 10 to make roughly 10 steps dimmer)
TaskValueSet,4,2,[dim01#Counter]*100/93
pwm,14,[dummy#d1],0,22000
if [dim01#Counter] >=1
let,1,[dummy#d1]
#TaskValueSet,4,3,[dummy#d1]
let,2,[dim01#Counter]
endif
endon


version:
Build:⋄ 20111 - Mega
System Libraries:⋄ ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄
Plugin Count:⋄ 46 [Normal]
Build Origin: Travis
Build Time:⋄ Nov 30 2020 00:38:42
Binary Filename:⋄ ESP_Easy_mega_20201130_normal_ESP8266_4M1M
Build Platform:⋄ Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29
Git HEAD:⋄ mega-20201130_f4f960c

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

Re: %v1% value not save

#2 Post by Ath » 31 Dec 2020, 18:54

On power-cycle, only settings are restored, not measured or calculated values.
The only values that will be saved are the Dummy Device values, and only during a warm boot (reset), not a cold boot (power off and on again).

ESP's (usually) don't have an on-board battery of some form, and storing to Flash would quickly wear out the flash memory, so that's why it is not able to restore on a power-cycle.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: %v1% value not save

#3 Post by TD-er » 01 Jan 2021, 12:30

Yep, all task values will be stored in so called "RTC memory".
This memory is kept as long as the unit is powered, so on a warm reboot or after a crash, the last values will be restored at boot.

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests