mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -20,7 +20,7 @@ To run the unit tests, follow these steps:
|
||||
3. Launch the CLI session and run the `unit_tests` command.
|
||||
|
||||
**NOTE:** To run a particular test (and skip all others), specify its name as the command argument.
|
||||
See [test_index.c](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/debug/unit_tests/test_index.c) for the complete list of test names.
|
||||
Test names match application names defined [here](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/debug/unit_tests/application.fam).
|
||||
|
||||
## Adding unit tests
|
||||
|
||||
@@ -28,7 +28,7 @@ See [test_index.c](https://github.com/flipperdevices/flipperzero-firmware/blob/d
|
||||
|
||||
#### Entry point
|
||||
|
||||
The common entry point for all tests is the [unit_tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests) app. Test-specific code is placed into an arbitrarily named subdirectory and is then called from the [test_index.c](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests/test_index.c) source file.
|
||||
The common entry point for all tests is the [unit_tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests) app. Test-specific code is packaged as a `PLUGIN` app placed in a subdirectory of `tests` in the `unit_tests` mother-app and referenced in the common `application.fam`. Look at other tests for an example.
|
||||
|
||||
#### Test assets
|
||||
|
||||
|
||||
BIN
documentation/images/byte_input.png
Normal file
BIN
documentation/images/byte_input.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -61,7 +61,7 @@ Reads a digital value from a pin configured with `direction: "in"` and any
|
||||
#### Returns
|
||||
Boolean logic level
|
||||
|
||||
### `Pin.read_analog()`
|
||||
### `Pin.readAnalog()`
|
||||
Reads an analog voltage level in millivolts from a pin configured with
|
||||
`direction: "in"` and `inMode: "analog"`
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ math.floor(45.05); // 45
|
||||
math.floor(45.95); // 45
|
||||
```
|
||||
|
||||
## is_equal
|
||||
## isEqual
|
||||
Return true if the difference between numbers `a` and `b` is less than the specified parameter `e`.
|
||||
|
||||
### Parameters
|
||||
@@ -236,8 +236,8 @@ True if the difference between numbers `a` and `b` is less than the specified pa
|
||||
|
||||
### Example
|
||||
```js
|
||||
math.is_equal(1.4, 1.6, 0.2); // false
|
||||
math.is_equal(3.556, 3.555, 0.01); // true
|
||||
math.isEqual(1.4, 1.6, 0.2); // false
|
||||
math.isEqual(3.556, 3.555, 0.01); // true
|
||||
```
|
||||
|
||||
## max
|
||||
|
||||
Reference in New Issue
Block a user