Some docs updates (#1179)

* Export magic constants during server initialization

* `docs`: add `magic constants` descriptions (or at least try)

* `docs`: add `min` and `max` simplexpr functions entries

* `docs`: `expander` should contain single child

* Update docs/src/magic-vars.md

Co-authored-by: Wölfchen <w-lfchen@posteo.net>

* `docs`: fix the heat units typo

* Revert "Export magic constants during server initialization"

This reverts commit 09fbdde6c99a4c4c8af39b76496878f99a28d568.

* Revert "Update docs/src/magic-vars.md"

This reverts commit b3dbfadfb2143cc0d3e2e21c0cf43ed0a96a53cf.

* Revert "`docs`: add `magic constants` descriptions (or at least try)"

This reverts commit f03aebf0dd2fba10c67c608f72570c230d0eb8ea.

---------

Co-authored-by: Wölfchen <w-lfchen@posteo.net>
This commit is contained in:
ovalkonia 2024-10-11 14:15:32 +03:00 committed by GitHub
parent ef32bf2c3f
commit 9a7e699539
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View file

@ -30,7 +30,7 @@ macro_rules! define_builtin_vars {
}
define_builtin_vars! {
// @desc EWW_TEMPS - Heat of the components in Celcius
// @desc EWW_TEMPS - Heat of the components in degree Celsius
// @prop { <name>: temperature }
"EWW_TEMPS" [2] => || Ok(DynVal::from(get_temperatures())),

View file

@ -312,7 +312,8 @@ fn build_gtk_combo_box_text(bargs: &mut BuilderArgs) -> Result<gtk::ComboBoxText
const WIDGET_NAME_EXPANDER: &str = "expander";
/// @widget expander
/// @desc A widget that can expand and collapse, showing/hiding it's children.
/// @desc A widget that can expand and collapse, showing/hiding it's children. Should contain
/// exactly one child.
fn build_gtk_expander(bargs: &mut BuilderArgs) -> Result<gtk::Expander> {
let gtk_widget = gtk::Expander::new(None);

View file

@ -40,6 +40,7 @@ Supported currently are the following features:
- some function calls:
- `round(number, decimal_digits)`: Round a number to the given amount of decimals
- `sin(number)`, `cos(number)`, `tan(number)`, `cot(number)`: Calculate the trigonometric value of a given number in **radians**
- `min(a, b)`, `max(a, b)`: Get the smaller or bigger number out of two given numbers
- `degtorad(number)`: Converts a number from degrees to radians
- `radtodeg(number)`: Converts a number from radians to degrees
- `replace(string, regex, replacement)`: Replace matches of a given regex in a string