RobertK66 / obc_1769_core

Implements hardware abstractions and Layer2(3) modules for usage of the OBC hardware in cubesat projects
GNU General Public License v3.0
1 stars 1 forks source link

Optimize sequencer module to avoid using "string" arguments as function input #52

Closed kodsurf closed 1 year ago

kodsurf commented 1 year ago

Use custom datastructure as an input to sequencer functions instead of "string" arguments. Avoid using atoi() .

kodsurf commented 1 year ago

https://github.com/RobertK66/obc_1769_core/commit/b44770b5c700a7a1b92456ff4887357d6e9821cf

Switched to arguments. Full redesign of parser.

Looks like no more hardfault.

I will leave it running for a night on a repeat sequence. Will see how stable

kodsurf commented 1 year ago

https://github.com/RobertK66/obc_1769_core/commit/608ead21db0245cc2ee4812a1ef1d2bc3a2af032

image

Great news ! I am sending SET requests with 2Hz frequency and thruster is able to handle it now.

Bad news - Hardfault will still ocure if I try sending "5" command too often manually during execution.

I set sequence 1 (which just sends set requests) on repeat and left it running. Will see if it would be able to handle without hardfault, if nothing else is interfering with OBC.

RobertK66 commented 1 year ago

As our design discussions advance I am not sure about this issue any more. But lets discuss this in a Teams session....

RobertK66 commented 1 year ago

I close this now for API calls I think ewe can/should go on wth argc argv Commands!

kodsurf commented 1 year ago

You mean we should continue using argv argc in sequencer ?

image can we use advantage of both approaches by uncommenting line 48 here ?

flexible string argv could be one of elements in custom structure

RobertK66 commented 1 year ago

Yes, I think maybe it is more practical for now and maybe also for flight version(!?) It will be easier for script storage and upload, but this is for sure a design discussion and not a bug/issue to be discussed,,,