News for hackers. Stuff that matters.
Re:Exploring the software that flies SpaceX rockets and star... by icegreentea2 on Tuesday May 11, 2021 @06:45AM (#27116443)
Right, but since you typically want timing guarantees (for example, "respond to change in measured acceleration within 20ms"), you'd often end up structuring and resourcing everything for the worst case (everything needs to be computed) anyways... which means that your graph optimization didn't end up saving any resources.

Also, there sometimes ARE interrupts meshed in with these main loop based systems (for whatever reason). They just aren't predominant. If your willing to through more hardware at things, you can typically always transform anything into a buffer.

Re:Exploring the software that flies SpaceX rockets and star... by HeyLaughingBoy on Tuesday May 11, 2021 @01:48PM (#27121144)
That pretty well describes the board in front of me ATM. Most of the system runs on a 20ms (I think) tick to manage the sensor read/evaluate/control loops, but there's a 10kHz timer interrupt always going that handles commutation of a stepper motor if it needs to run. 99.9% of the time, the interrupt fires, sees there's nothing to do and just returns.
Re:Exploring the software that flies SpaceX rockets and star... by froh on Tuesday May 11, 2021 @10:20AM (#27118407)
for battery electric use cases it saves energy: you do just the necessary computations and you sleep the CPU until the next cycle. if little has changed you can sleep a lot. if a lot of rumpus is happening, you use the full cycle.