gauteh / sfy

🌊 A lightweight wave buoy for near-shore deployments.
MIT License
45 stars 7 forks source link

Message passing between subsystems: architecture? #7

Closed gauteh closed 2 years ago

gauteh commented 2 years ago

The main CPU needs to organize:

In order to keep the notecard off as much as possible we need to cache the data locally. We should also not process data more than necessary, so the read values should be buffered before processing.

We need to pass the information back and forth and I am thinking that maybe the following setup is a good compromise:

Setup the following queues

Notecard

IMU

IMU processing

The main routine needs to

At some point this approximates RTIC (https://rtic.rs/0.5/book/en/), at which point it would be better use it directly.

@jerabaul29: These decisions would be great to have your view on. If there's a chance that this setup might be useful in a future common firmware for the buoys at MET maybe you'd like to be involved in how this is implemented. There is probably significant overlap in theory and principle of operation between the latest platform-io version, so the approach tested out here and there will be valuable experiences whatever the final version looks like. Let me know if you have time for a chat.

jerabaul29 commented 2 years ago

Sorry, I had missed this issue. We can discuss this next time we have a chat if you want :) .

gauteh commented 2 years ago

No I think we had a discussion several days ago about this. Anyway, I have a simple solution for now.