leahi-dialin

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
The approach of what this code does and the conversion module are similar in function but a differ on maintenance and flexibility. 1. The conversion module's bytearray to value methods work, but th...

The approach of what this code does and the conversion module are similar in function but a differ on maintenance and flexibility.
1. The conversion module's bytearray to value methods work, but they require manual logistic around the indexing. It's the user's responsibility to handle where the reading starts and you need to code the handler for that (previous approach with MsgFieldPositions), It's inflating the method. I worked hard to remove the need for indexing where the value starts. Instead of the previous struct.unpack approach, where you needed to maintain the type, you will be needing to maintain the conversion methods that are being called, so it would be the same as before, you still need to mind the indexing, which was the main reason of changing from this approach.

2. In the current approach, you declare the type and pass it to a processor that dynamically handling the unpack type (based on the set datatype) and the indexing for that. This works much better and easier to maintain, as you can just insert a new value when it's added to the FW, and don't need to adjust all your indexes for the reading.

Example #1, changing build type from U16 to U08:

  • with the conversion approach, you need to change the function used, and update the starting index for all the following methods.
  • with the current approach you change the Datatype.U16 to Datatype.U08 and that's all you need to do.


Example #2: adding a new variable fpga_micro after fpga_minor, with U08 type:

  • with the conversion approach, you add the bytearray_to_byte, update the indexes for all the following reads.
  • with the current approach you insert an element after the fpga_minor with a value ('fpga_micro', Datatype.U08), and nothing more needed
fixed. thanks!

fixed. thanks!

fixed. thanks

fixed. thanks

Add uncompensated conductivity to the init too

Add uncompensated conductivity to the init too

Add uncompensated conductivity to the init too

Add uncompensated conductivity to the init too

RESOLVED for now.

RESOLVED for now.

I would not do that because the function names and messages for each project should be different to avoid confusion. I think that is fine for now. RESOLVED.

I would not do that because the function names and messages for each project should be different to avoid confusion.
I think that is fine for now.

RESOLVED.

even though we are sending U08 at Firmware. Due to structure padding Raw message for priority is converted as 16 bits. While receiving we need to read them as U16. Here is my debug values [CortexR4...

even though we are sending U08 at Firmware. Due to structure padding Raw message for priority is converted as 16 bits. While receiving we need to read them as U16. Here is my debug values [CortexR4] ALARM_PROP_T size = 22 bytes
byte[0] = 0x03
byte[1] = 0x00
byte[2] = 0x6F
byte[3] = 0x00
byte[4] = 0x01
byte[5] = 0x00
byte[6] = 0x00
byte[7] = 0x01
byte[8] = 0x00
byte[9] = 0x00
byte[10] = 0x01
byte[11] = 0x00
byte[12] = 0x00
byte[13] = 0x01
byte[14] = 0x00
byte[15] = 0x00
byte[16] = 0x01
byte[17] = 0x00
byte[18] = 0x00
byte[19] = 0x01
byte[20] = 0x0A
byte[21] = 0x00

This is structure defined at firmware side
struct AlarmTableRequestPayload

Unknown macro: { U08 alarmPriority; U16 alarmSubRank; U08 alarmSource; U08 alarmIsFault; U08 alarmIsDDFault; U08 alarmStops; U08 alarmConditionClearImmed; ///< Alarm condition is cleared immediately (does not persist after alarm triggered) U08 alarmNoClear; ///< Alarm cannot be cleared (unrecoverable)? U08 alarmNoResume; ///< Alarm prevents treatment resume U08 alarmNoRinseback; ///< Alarm prevents rinseback U08 alarmNoEndTreatment; ///< Alarm prevents ending treatment U08 alarmBlockRinseback; ///< Alarm should not trigger while in rinseback states U08 alarmBlockEndTx; ///< Alarm should not trigger while in post-treatment mode U08 alarmNoBloodRecirc; ///< Alarm prevents blood re-circulation U08 alarmNoDialysateRecirc; ///< Alarm prevents dialysate re-circulation U08 alarmAutoResume; ///< Alarm should resume automatically once the condition is cleared U08 alarmClearOnly; ///< Clear only this alarm on user acknowledgment U08 alarmTreatmentLog; ///< Log alarm to treatment log if active during treatment U16 alarmID; ///< Alarm ID }

;
typedef struct AlarmTableRequestPayload ALARM_PROP_T;

So the same channels are used for both the Leahi and Denali? I am not talking about how collisions are handled; that is handled by the CAN driver, not the FW or SW. My point is that the CAN Channel...

So the same channels are used for both the Leahi and Denali?
I am not talking about how collisions are handled; that is handled by the CAN driver, not the FW or SW.
My point is that the CAN Channels by themselves do not have the meaning we want; they are only a priority.
As we defined them, we gave them a meaning as a category; therefore, it is better to name them the Denali/Leahi Channels rather than the CAN Channels.

RESOLVED.

RESOLVED.

def fp_versions(self, major: int, minor: int, micro: int, build: int, fpga_id: int, fpga_major: int, fpga_minor: int, fpga_lab: int, compatibility_rev: int...
def fp_versions(self, major: int, minor: int, micro: int, build: int,
                     fpga_id: int, fpga_major: int, fpga_minor: int, fpga_lab: int,
                     compatibility_rev: int):
     """
     Broadcasts the current dd Version Data (Msg ID: 0x0F, 15)
     Args:
         @param major: (uint) - Major version number
         @param minor: (uint) - Minor version number
         @param micro: (uint) - Micro version number
         @param build: (uint) - Build version number
         @param fpga_id: (int) - FPGA id version number
         @param fpga_major: (int) - FPGA Major version number
         @param fpga_minor: (int) - FPGA Minor version number
         @param fpga_lab: (int) - FPGA Lab version number
         @param compatibility_rev: (uint) - The FWs/UI compatibility revision
     @return: None
     """
     if not self.can_enabled:
         raise ValueError("CAN Interface is not enabled")

     payload =  conversions.unsigned_byte_to_bytearray   (major            )
     payload += conversions.unsigned_byte_to_bytearray   (minor            )
     payload += conversions.unsigned_byte_to_bytearray   (micro            )
     payload += conversions.unsigned_short_to_bytearray  (build            )
     payload += conversions.unsigned_byte_to_bytearray   (fpga_id          )
     payload += conversions.unsigned_byte_to_bytearray   (fpga_major       )
     payload += conversions.unsigned_byte_to_bytearray   (fpga_minor       )
     payload += conversions.unsigned_byte_to_bytearray   (fpga_lab         )
     payload += conversions.unsigned_integer_to_bytearray(compatibility_rev)

     message = CAN.CanMessage.build_message(
                                         channel_id=CAN.CanChannels.fp_sync_broadcast_ch_id,
                                         message_id=msg_ids.MsgIds.MSG_ID_FP_VERSION_RESPONSE.value,
                                         payload=payload)

     self.can_interface.send(message, 0)
Type change

    • -1
    • +1
    /leahi_dialin/td/modules/blood_flow.py
LEAHI-DIALIN-LDT-4505_(TD) H4 blood pump does not run in reverse
LEAHI-DIALIN-LDT-4505_(TD) H4 blood pump does not run in reverse
No, that will cause an error on pip

No, that will cause an error on pip

Please leave a comment to remind the developers that "-" will confuse .whl.

Please leave a comment to remind the developers that "-" will confuse .whl.

Should this be "." instead of "-" to be consistent?

Should this be "." instead of "-" to be consistent?

Is this .wsl or .whl?

Is this .wsl or .whl?

LEAHI-DIALIN-LDT-4734_Water Treatment and Degassing - FW Iteration - 5/4:
LEAHI-DIALIN-LDT-4734_Water Treatment and Degassing - FW Iteration - 5/4:
FW sends U16 for now, after it's changed to U08, this will be updated

FW sends U16 for now, after it's changed to U08, this will be updated

I pushed the changes, no idea why it's not present here

I pushed the changes, no idea why it's not present here

Merge branch 'feature/LDT-4787-enhancement-power-off' into staging

Merge branch 'feature/LDT-4747-fp-diagnostics' into staging

Priority data type is U08?

Priority data type is U08?

LDT-4795 NON-FEATURE: SW Misc & Enhc - SW - 01 - Power Control - Shutdown - R&I - 08: DEV - Dialin Implementation

fix msg id

Merge remote-tracking branch 'origin/staging' into feature/LDT-4787-enhancement-power-off