Club-INTech / TechTheTaste_HighLevel

This repository is the High Level software architecture of the 2 robots of INTech (the robotic association of Telecom SudParis) that will participate to the french robtotic championship organized by Eurobot/Planète Science.
0 stars 0 forks source link

BaseMicro and microCOM classes [COM branch] #4

Open sudogauss opened 1 year ago

sudogauss commented 1 year ago

Is there real necessity to have two microcontroller classes? In plus microCOM.py and a class inside it don't have the same name. repr method seems to be very strange. Move ORDER_LENGTH and FEEDBACK_LENGTH to consts.

make_message use a very tricky float to int bit conversion (inspired by fast inverse square root I suppose). Why not to use fixed point integer for floats?

The endianness choice must me in constructor.

Note : There is a separate issue for BaseMicro.py

EKnight-Blue commented 1 year ago

There is a parent class and two classes inherit from it: MicroProc and Shell as they are two different use of the BaseMicro class. Indeed __repr__ is strange. Fair point about the constants

make_message does not use this trick, the code on the pico size does (well guessed). As I do not know the range needed for variables, and as I can send floatting point numbers I prefer to ensure that every value can be sent and received

Typo ?

Where ?