Various improvements (#461)
* **New Features** * Time and delay utilities added (ticks, ms, µs); SD card now uses an expansion-header CS pin; HTTP downloads warn when run on the GUI task and yield to avoid blocking. * **Bug Fixes / Reliability** * Many hard-crash paths converted to guarded checks to reduce abrupt termination and improve stability. * **Tests** * Unit tests added to validate time and delay accuracy. * **Chores** * License header and build/macro updates.
This commit is contained in:
committed by
GitHub
parent
619b5aa53b
commit
e6abd496f9
@@ -1,4 +1,5 @@
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <Tactility/Check.h>
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
#include <Tactility/hal/Device.h>
|
||||
#include <Tactility/hal/gps/GpsInit.h>
|
||||
@@ -68,20 +69,19 @@ void init(const Configuration& configuration) {
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitHalBegin);
|
||||
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitI2cBegin);
|
||||
tt_check(i2c::init(configuration.i2c), "I2C init failed");
|
||||
check(i2c::init(configuration.i2c), "I2C init failed");
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitI2cEnd);
|
||||
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitSpiBegin);
|
||||
tt_check(spi::init(configuration.spi), "SPI init failed");
|
||||
check(spi::init(configuration.spi), "SPI init failed");
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitSpiEnd);
|
||||
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitUartBegin);
|
||||
tt_check(uart::init(configuration.uart), "UART init failed");
|
||||
check(uart::init(configuration.uart), "UART init failed");
|
||||
kernel::publishSystemEvent(kernel::SystemEvent::BootInitUartEnd);
|
||||
|
||||
if (configuration.initBoot != nullptr) {
|
||||
LOGGER.info("Init boot");
|
||||
tt_check(configuration.initBoot(), "Init boot failed");
|
||||
check(configuration.initBoot(), "Init boot failed");
|
||||
}
|
||||
|
||||
registerDevices(configuration);
|
||||
|
||||
Reference in New Issue
Block a user