Skip to content

Commit

Permalink
Berry tasmota.int
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Dec 27, 2024
1 parent 5a23881 commit 3208653
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/Berry.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,9 @@ tasmota.remove\_driver<a class="cmnd" id="tasmota_remove_driver"></a>|`(instance
tasmota.gc<a class="cmnd" id="tasmota_gc"></a>|`() -> int`<br>Triggers garbage collection of Berry objects and returns the bytes currently allocated. This is for debug only and shouldn't be normally used. `gc` is otherwise automatically triggered when necessary.
tasmota.urlfetch<a class="cmnd" id="tasmota_urlfetch"></a>|`(url:string [, filename:string]) -> bytes:int`<br>Download a url (http or https) and store the content in the filesystem<br>`filename` is optional, needed if you want to change the name of the file from the url suffix. Returns the number of bytes downloaded or -1 if failed.
tasmota.urlbecload<a class="cmnd" id="tasmota_urlbecload"></a>|`(url:string) -> bool`<br>Download `.bec` file from a url and run it, return `true` if sucessful. This allows to run complementary code like Partition Wizard from precompiled Berry.
tasmota.scale\_uint<a class="cmnd" id="tasmota_scale_uint"></a>|`(value:int, fromMin:int, fromMax:int, toMin:int, toMax:int) -> int`<br>Linear scaling of an integer range, based on two points on the line, typically min and max for "from" and "to" ranges.

tasmota.scale\_uint<a class="cmnd" id="tasmota_scale_uint"></a>|`(value:int, fromMin:int, fromMax:int, toMin:int, toMax:int) -> int`<br>Linear scaling of an unsigned integer range, based on two points on the line, typically min and max for "from" and "to" ranges. The internal implementation works better on 16 bits integers.
tasmota.scale\_int<a class="cmnd" id="tasmota_scale_int"></a>|`(value:int, fromMin:int, fromMax:int, toMin:int, toMax:int) -> int`<br>Linear scaling of an integer range, based on two points on the line, typically min and max for "from" and "to" ranges.
tasmota.int<a class="cmnd" id="tasmota_int"></a>|`(value:int, min:int, max:int) -> int`<br>Convert a value `v` to an `int` and to guard the value between `min` and `max`. If `v` is `nil`, it returns `min`. If `min > max`, it returns `min`. If `min` or `max` are `nil`, it behaves like Berry native `int()`.<BR>Since v14.4.2

#### Functions used to retrieve Tasmota configuration

Expand Down

0 comments on commit 3208653

Please sign in to comment.