Open-Smartwatch / open-smartwatch-os

The Open-Smartwatch Operating System.
https://open-smartwatch.github.io
GNU General Public License v3.0
999 stars 163 forks source link

Toast message service is not working #414

Open RuffaloLavoisier opened 1 week ago

RuffaloLavoisier commented 1 week ago

What is not working?

The floating message is not output.

How to reproduce this

connect BLE . and send message to OSW device.

What should happen instead?

The floating message must be show on display.

Environment

Additional context

-

simonmicro commented 1 week ago

It seems that my machine is working fine, while @RuffaloLavoisier Mac produces a binary with different behavior - even with the same commit hash AND same PlatformIO packages.

Let's see, if the artifacts of the pipeline have the same problem: https://github.com/Open-Smartwatch/open-smartwatch-os/actions/runs/11766491951

simonmicro commented 1 week ago

Update: The build from the CI is working fine, so something is going wrong with your local builds @RuffaloLavoisier . I just downloaded the firmwares.zip from the pipeline mentioned before, copied the LIGHT_EDITION_V3_3-en-US-debug.bin binary as firmware.bin into my .pio/build/LIGHT_EDITION_V3_3 folder and ran pio run -t nobuild -t upload -e LIGHT_EDITION_V3_3 to upload it directly.

simonmicro commented 1 week ago

@RuffaloLavoisier Try to clear everything regarding PlatformIO and caches from your system: Remove your ~/.pio and ~/.platformio folders, remove the .pio folder from the project and perform a clean build. If this still does not help, please upload a firmware here, which has this issue for further analysis.

RuffaloLavoisier commented 1 week ago

@simonmicro

In my side, the same issue happened with macOS workflow..

What do you think is the cause of this issue based on your review? Also, what should the correct values be under normal circumstances?

void OswServiceTaskNotifier::loop() {
    const std::lock_guard<std::mutex> lock{mutlimapMutex};
    auto utcTime = std::chrono::system_clock::from_time_t(OswHal::getInstance()->getUTCTime());
    auto currentTime = utcTime + std::chrono::seconds{static_cast<int>(OswHal::getInstance()->getTimezoneOffsetPrimary())};
    if (auto it = scheduler.begin();
            it != scheduler.end() && currentTime >= it->first) { . . . }
}

I believe it is a problem if a single piece of code is compiled and runs differently depending on the operating system.