|
LD2410Async
Asynchronous Arduino ESP32 library for the LD2410 mmWave radar sensor
|
Go to the source code of this file.
Macros | |
| #define | RADAR_RX_PIN 32 |
| Unit Test for most methods of the lib. | |
| #define | RADAR_TX_PIN 33 |
| #define | RADAR_BAUDRATE 256000 |
Typedefs | |
| typedef void(* | TestAction) () |
Variables | |
| LD2410Async | ld2410 (RadarSerial) |
| Ticker | onceTicker |
| LD2410Types::ConfigData | orgConfigData |
| unsigned long | testStartMs = 0 |
| String | currentTestName |
| int | testSuccessCount = 0 |
| int | testFailCount = 0 |
| int | currentTestIndex = -1 |
| bool | testSequenceRunning = false |
| const int | LINE_LEN = 80 |
| TestEntry | actions [] |
| const int | NUM_ACTIONS = sizeof(actions) / sizeof(actions[0]) |
| Ticker | testDelayTicker |
| int | dataUpdateCounter_normalModeCount = 0 |
| int | dataUpdateCounter_engineeringModeCount = 0 |
| int | asyncIsBusyTest_Count = 0 |
| int | asyncCancelTest_Count = 0 |
| LD2410Types::LightControl | lightControlToApply |
| LD2410Types::OutputControl | outputControlToApply |
| byte | lightThresholdToApply |
| byte | movingThresholdToApply |
| byte | stationaryThresholdToApply |
| byte | maxMovingGateToApply |
| byte | maxStationaryGateToApply |
| short | nooneTimeoutToApply |
| LD2410Types::DistanceResolution | distanceResolutionToApply |
| LD2410Types::ConfigData | configDataToApply |
| #define RADAR_BAUDRATE 256000 |
Definition at line 33 of file unitTest.ino.
| #define RADAR_RX_PIN 32 |
Unit Test for most methods of the lib.
This sketch tests most methods of the LD2410Async lib and prints the test rusults to the serial monitor.
Important: Dont forget to adjust RADAR_RX_PIN and RADAR_TX_PIN according to your wiring.
Definition at line 28 of file unitTest.ino.
| #define RADAR_TX_PIN 33 |
Definition at line 29 of file unitTest.ino.
| typedef void(* TestAction) () |
Definition at line 75 of file unitTest.ino.
| void asyncCancelCancelCommand | ( | ) |
Definition at line 823 of file unitTest.ino.
| void asyncCancelTest | ( | ) |
Definition at line 829 of file unitTest.ino.
| void asyncCancelTestDiableConfigMode | ( | ) |
Definition at line 796 of file unitTest.ino.
| void asyncCancelTestDisableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 787 of file unitTest.ino.
| void asyncCancelTestEnableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 807 of file unitTest.ino.
| String asyncCommandResultToString | ( | LD2410Async::AsyncCommandResult | result | ) |
Definition at line 240 of file unitTest.ino.
| void asyncIsBusyTest | ( | ) |
Definition at line 764 of file unitTest.ino.
| void asyncIsBusyTestCheckBusy | ( | ) |
Definition at line 755 of file unitTest.ino.
| void asyncIsBusyTestDisableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 726 of file unitTest.ino.
| void asyncIsBusyTestEnableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 735 of file unitTest.ino.
| void auxControlSettingsTest | ( | ) |
Definition at line 1275 of file unitTest.ino.
| void auxControlSettingsTestConfigureCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1258 of file unitTest.ino.
| void auxControlSettingsTestRequestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1234 of file unitTest.ino.
| void beginTest | ( | ) |
Definition at line 316 of file unitTest.ino.
| void configDataStructValidationTest | ( | ) |
Definition at line 1071 of file unitTest.ino.
| void configModePersistenceTest | ( | ) |
Definition at line 593 of file unitTest.ino.
| void configModePersistenceTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 582 of file unitTest.ino.
| void configModePersistenceTestCheckConfigMode | ( | ) |
Definition at line 568 of file unitTest.ino.
| void configModePersistenceTestEnd | ( | ) |
Definition at line 558 of file unitTest.ino.
| void configureAllSettingsTest | ( | ) |
Definition at line 1545 of file unitTest.ino.
| void configureAllSettingsTestConfigureCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1528 of file unitTest.ino.
| void configureAllSettingsTestRequestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1507 of file unitTest.ino.
| void configureMaxGateAndNoOneTimeoutAsyncTest | ( | ) |
Definition at line 1415 of file unitTest.ino.
| void configureMaxGateAndNoOneTimeoutAsyncTestConfigureCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1398 of file unitTest.ino.
| void configureMaxGateAndNoOneTimeoutAsyncTestRequestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1375 of file unitTest.ino.
| void dataUpdateCounterCallback | ( | LD2410Async * | sender, |
| bool | presenceDetected ) |
Definition at line 287 of file unitTest.ino.
| void dataUpdateCounterReset | ( | ) |
Definition at line 281 of file unitTest.ino.
| void disableConfigModeTest | ( | ) |
Definition at line 641 of file unitTest.ino.
| void disableConfigModeTestCheckForDataUpdates | ( | ) |
Definition at line 620 of file unitTest.ino.
| void disableConfigModeTestDisableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 629 of file unitTest.ino.
| void disableConfigModeTestEnd | ( | ) |
Definition at line 609 of file unitTest.ino.
| void disableDisabledConfigModeTest | ( | ) |
Definition at line 670 of file unitTest.ino.
| void disableDisabledConfigModeTestDisableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 659 of file unitTest.ino.
| void disableEngineeringModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 479 of file unitTest.ino.
| void disableEngineeringModeTest | ( | ) |
Definition at line 491 of file unitTest.ino.
| void disableInactivityHandlingTest | ( | ) |
Definition at line 1047 of file unitTest.ino.
| void disableInactivityHandlingTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1030 of file unitTest.ino.
| void disableInactivityHandlingTestConfigModeDisabled | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 998 of file unitTest.ino.
| void disableInactivityHandlingTestTimeElapsed | ( | ) |
Definition at line 1010 of file unitTest.ino.
| void distanceResolutionTest | ( | ) |
Definition at line 1481 of file unitTest.ino.
| void distanceResolutionTestConfigureCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1464 of file unitTest.ino.
| void distanceResolutionTestRequestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1443 of file unitTest.ino.
| void enableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 528 of file unitTest.ino.
| void enableConfigModeTest | ( | ) |
Definition at line 540 of file unitTest.ino.
| void enableConfigModeTestCheckForDataUpdates | ( | ) |
Definition at line 519 of file unitTest.ino.
| void enableConfigModeTestEnd | ( | ) |
Definition at line 508 of file unitTest.ino.
| void enableEngineeringModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 407 of file unitTest.ino.
| void enableEngineeringModeTest | ( | ) |
Definition at line 419 of file unitTest.ino.
| void engineeringModeDataReceiveTest | ( | ) |
Definition at line 461 of file unitTest.ino.
| void engineeringModeDataReceiveTestEnd | ( | ) |
Definition at line 436 of file unitTest.ino.
| void gateParametersTest | ( | ) |
Definition at line 1344 of file unitTest.ino.
| void gateParametersTestConfigureSingleGateCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1327 of file unitTest.ino.
| void gateParametersTestRequestGateParametersCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1305 of file unitTest.ino.
| void getConfigDataTest | ( | ) |
Definition at line 1204 of file unitTest.ino.
| void inactivityHandlingTest | ( | ) |
Definition at line 969 of file unitTest.ino.
| void inactivityHandlingTestEnableConfigModeCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 955 of file unitTest.ino.
| void inactivityHandlingTestEnd | ( | ) |
Definition at line 941 of file unitTest.ino.
| void initializeConfigDataStruct | ( | LD2410Types::ConfigData & | configData | ) |
Definition at line 253 of file unitTest.ino.
| void loop | ( | ) |
Definition at line 1761 of file unitTest.ino.
| void normalModeDataReceiveTest | ( | ) |
Definition at line 389 of file unitTest.ino.
| void normalModeDataReceiveTestEnd | ( | ) |
Definition at line 363 of file unitTest.ino.
| void printBigMessage | ( | const String | msg, |
| char | lineChar = '*' ) |
Definition at line 98 of file unitTest.ino.
| void printLine | ( | char | c, |
| int | len ) |
Definition at line 93 of file unitTest.ino.
| void printOne | ( | const T & | first, |
| const Args &... | rest ) |
Definition at line 123 of file unitTest.ino.
| void printOne | ( | const T & | value | ) |
Definition at line 118 of file unitTest.ino.
| HardwareSerial RadarSerial | ( | 1 | ) |
| void rebootTest | ( | ) |
Definition at line 343 of file unitTest.ino.
| void rebootTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 331 of file unitTest.ino.
| void requestAllConfigSettingsAsyncTest | ( | ) |
Definition at line 1183 of file unitTest.ino.
| void requestAllConfigSettingsAsyncTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1167 of file unitTest.ino.
| void requestBluetoothMacAddressAsyncTest | ( | ) |
Definition at line 886 of file unitTest.ino.
| void requestBluetoothMacAddressAsyncTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 877 of file unitTest.ino.
| void requestDistanceResolutionAsyncTest | ( | ) |
Definition at line 920 of file unitTest.ino.
| void requestDistanceResolutionAsyncTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 904 of file unitTest.ino.
| void requestFirmwareAsyncTest | ( | ) |
Definition at line 859 of file unitTest.ino.
| void requestFirmwareAsyncTestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 850 of file unitTest.ino.
| void restoreFactorySettingsTest | ( | ) |
Definition at line 1620 of file unitTest.ino.
| void restoreFactorySettingsTestResetCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1603 of file unitTest.ino.
| void restoreFactorySettingsTesttRequestCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1582 of file unitTest.ino.
| void setup | ( | ) |
Definition at line 1737 of file unitTest.ino.
| void startDataUpdateCounter | ( | ) |
Definition at line 302 of file unitTest.ino.
| void startNextTest | ( | ) |
Definition at line 1715 of file unitTest.ino.
| void startTests | ( | ) |
Definition at line 1728 of file unitTest.ino.
| void stopDataUpdateCounter | ( | ) |
Definition at line 308 of file unitTest.ino.
| void testEnd | ( | bool | success, |
| const Args &... | commentParts ) |
Definition at line 159 of file unitTest.ino.
| void testPrint | ( | const Args &... | args | ) |
Definition at line 229 of file unitTest.ino.
| void testStart | ( | String | name, |
| String | comment = "" ) |
Definition at line 133 of file unitTest.ino.
| void writeBackOrgConfigData | ( | ) |
Definition at line 1651 of file unitTest.ino.
| void writeBackOrgConfigDataCallback | ( | LD2410Async * | sender, |
| LD2410Async::AsyncCommandResult | asyncResult ) |
Definition at line 1642 of file unitTest.ino.
| TestEntry actions |
Definition at line 1670 of file unitTest.ino.
| int asyncCancelTest_Count = 0 |
Definition at line 785 of file unitTest.ino.
| int asyncIsBusyTest_Count = 0 |
Definition at line 724 of file unitTest.ino.
| LD2410Types::ConfigData configDataToApply |
Definition at line 1505 of file unitTest.ino.
| int currentTestIndex = -1 |
Definition at line 64 of file unitTest.ino.
| String currentTestName |
Definition at line 57 of file unitTest.ino.
| int dataUpdateCounter_engineeringModeCount = 0 |
Definition at line 278 of file unitTest.ino.
| int dataUpdateCounter_normalModeCount = 0 |
Definition at line 277 of file unitTest.ino.
| LD2410Types::DistanceResolution distanceResolutionToApply |
Definition at line 1441 of file unitTest.ino.
| LD2410Async ld2410(RadarSerial) | ( | RadarSerial | ) |
| LD2410Types::LightControl lightControlToApply |
Definition at line 1230 of file unitTest.ino.
| byte lightThresholdToApply |
Definition at line 1232 of file unitTest.ino.
| const int LINE_LEN = 80 |
Definition at line 69 of file unitTest.ino.
| byte maxMovingGateToApply |
Definition at line 1370 of file unitTest.ino.
| byte maxStationaryGateToApply |
Definition at line 1371 of file unitTest.ino.
| byte movingThresholdToApply |
Definition at line 1301 of file unitTest.ino.
| short nooneTimeoutToApply |
Definition at line 1372 of file unitTest.ino.
Definition at line 1707 of file unitTest.ino.
| Ticker onceTicker |
Definition at line 49 of file unitTest.ino.
| LD2410Types::ConfigData orgConfigData |
Definition at line 52 of file unitTest.ino.
| LD2410Types::OutputControl outputControlToApply |
Definition at line 1231 of file unitTest.ino.
| byte stationaryThresholdToApply |
Definition at line 1302 of file unitTest.ino.
| Ticker testDelayTicker |
Definition at line 156 of file unitTest.ino.
| int testFailCount = 0 |
Definition at line 61 of file unitTest.ino.
| bool testSequenceRunning = false |
Definition at line 66 of file unitTest.ino.
| unsigned long testStartMs = 0 |
Definition at line 55 of file unitTest.ino.
| int testSuccessCount = 0 |
Definition at line 60 of file unitTest.ino.