Refactor CLARIOstarBackend command handling and add plate geometry#688
Refactor CLARIOstarBackend command handling and add plate geometry#688maraxen wants to merge 1 commit intoPyLabRobot:mainfrom
Conversation
|
This PR refactors how commands are processed by the send function and introduces dynamic handling of plate dimensions and well positioning. Command Processing ChangesWhen commands are processed by send, the following occurs:
Plate Encodings & Future ImprovementThe logging for plate encodings now includes a human-readable explanation for each byte in the debug stream. I think we should also consider using a dedicated data structure (dataclass + struct?) to model the plate encoding and command structure instead of raw byte manipulation. While not used in existing PLR code as far as I know, moving away from raw byte manipulation will be crucial as we pursue support of multiple modalities (wavelengths, plate modes, additional settings) and past endpoint measurements. A structured approach will provide a cleaner way to assess which bytes modulate specific instrument settings, making the system easier to debug and maintain without sacrificing ease of use for the user. This also makes following the logic of the code easier as a developer in my opinion. Work RemainingI need to figure out what is going wrong on receiving the data stream back from the plate reader. It would also be great to get @BioCam to try to use this on the Plus. I suspect that there are some firmware differences that emerge into different commands. I'm hoping the eeprom data can delineate variants well enough for us to parse, but this is another area where having a defined data structure might make things easier to develop compared to on the fly decision trees in the code. |
1675cd6 to
2b2f7f9
Compare
Changed a bit of how the command is handling with what we have learned and integrated plate geometries.
I have tested read_absorbance and validated it sends the commands succesfully and plate reading happens, but it seems to have trouble catching the response, but I wanted to start the PR to get feedback on the other aspects while I debug that and the luminesence.