Merge develop into main (#167)
- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on. - WiFi service now turns on WiFi when calling connect() and WiFi is not on. - Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex. - Various apps: Moved private headers into Private/ folder. - Various apps: created start() function for easy starting. - Added documentation to all TactilityC APIs - Refactored various `enum` into `class enum` - Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
This commit is contained in:
committed by
GitHub
parent
3ca0f8cf97
commit
3ea02d912f
@@ -18,7 +18,7 @@ static void timer_callback_with_counter(std::shared_ptr<void> context) {
|
||||
|
||||
TEST_CASE("a timer passes the context correctly") {
|
||||
auto foo = std::make_shared<int>(1);
|
||||
auto* timer = new Timer(Timer::TypeOnce, &timer_callback_with_context, foo);
|
||||
auto* timer = new Timer(Timer::Type::Once, &timer_callback_with_context, foo);
|
||||
timer->start(1);
|
||||
kernel::delayTicks(10);
|
||||
timer->stop();
|
||||
@@ -27,9 +27,9 @@ TEST_CASE("a timer passes the context correctly") {
|
||||
CHECK_EQ(*std::static_pointer_cast<int>(timer_callback_context), *foo);
|
||||
}
|
||||
|
||||
TEST_CASE("TimerTypePeriodic timers can be stopped and restarted") {
|
||||
TEST_CASE("TimerType::Periodic timers can be stopped and restarted") {
|
||||
auto counter = std::make_shared<int>(0);
|
||||
auto* timer = new Timer(Timer::TypePeriodic, &timer_callback_with_counter, counter);
|
||||
auto* timer = new Timer(Timer::Type::Periodic, &timer_callback_with_counter, counter);
|
||||
timer->start(1);
|
||||
kernel::delayTicks(10);
|
||||
timer->stop();
|
||||
@@ -41,10 +41,10 @@ TEST_CASE("TimerTypePeriodic timers can be stopped and restarted") {
|
||||
CHECK_GE(*counter, 2);
|
||||
}
|
||||
|
||||
TEST_CASE("TimerTypePeriodic calls the callback periodically") {
|
||||
TEST_CASE("TimerType::Periodic calls the callback periodically") {
|
||||
auto counter = std::make_shared<int>(0);
|
||||
int ticks_to_run = 10;
|
||||
auto* timer = new Timer(Timer::TypePeriodic, &timer_callback_with_counter, counter);
|
||||
auto* timer = new Timer(Timer::Type::Periodic, &timer_callback_with_counter, counter);
|
||||
timer->start(1);
|
||||
kernel::delayTicks(ticks_to_run);
|
||||
timer->stop();
|
||||
@@ -53,9 +53,9 @@ TEST_CASE("TimerTypePeriodic calls the callback periodically") {
|
||||
CHECK_EQ(*counter, ticks_to_run);
|
||||
}
|
||||
|
||||
TEST_CASE("restarting TimerTypeOnce timers calls the callback again") {
|
||||
TEST_CASE("restarting TimerType::Once timers calls the callback again") {
|
||||
auto counter = std::make_shared<int>(0);
|
||||
auto* timer = new Timer(Timer::TypeOnce, &timer_callback_with_counter, counter);
|
||||
auto* timer = new Timer(Timer::Type::Once, &timer_callback_with_counter, counter);
|
||||
timer->start(1);
|
||||
kernel::delayTicks(10);
|
||||
timer->stop();
|
||||
|
||||
Reference in New Issue
Block a user