Skip to content

Commit

Permalink
MNT: clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
JJL772 committed Aug 1, 2024
1 parent b02d926 commit f86effe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ek9000App/src/devEL3XXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ struct EL30XXStandardInputPDO_t {
uint8_t _r2 : 6; // Last bit in this align is Sync error for EL31XX
uint8_t txpdo_state : 1;
uint8_t txpdo_toggle : 1;
int16_t value; // Must be signed to accommodate bipolar terminals. Unsigned representation still defines range as 0-32767, so this is safe.
int16_t value; // Must be signed to accommodate bipolar terminals. Unsigned representation still defines range as
// 0-32767, so this is safe.
};
#pragma pack()

Expand Down
14 changes: 7 additions & 7 deletions ek9000App/src/devEL4XXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ struct devEL40XX_t {

epicsExportAddress(dset, devEL40XX);

// The default representation for all of these terminals is signed. Unsigned may also be set, even for the bipolar terminals that
// may produce a negative value. To retain some level of support for unsigned representation, terminals that have a positive
// output range use uint16_t as the PDO type. Bipolar terminals always use int16_t to support negative values and will behave incorrectly
// if you choose the unsigned (or absolute w/MSB sign) representation.
// The default representation for all of these terminals is signed. Unsigned may also be set, even for the bipolar
// terminals that may produce a negative value. To retain some level of support for unsigned representation, terminals
// that have a positive output range use uint16_t as the PDO type. Bipolar terminals always use int16_t to support
// negative values and will behave incorrectly if you choose the unsigned (or absolute w/MSB sign) representation.

DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4001);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4002);
Expand All @@ -75,16 +75,16 @@ DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4021);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4022);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4024);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4028);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4031); // EL403X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4031); // EL403X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4032);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4034);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4038);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4102);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4104);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4112); // EL411X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4112); // EL411X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4114);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(uint16_t, EL4122);
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4132); // EL413X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4132); // EL413X support negative output values.
DEFINE_SINGLE_CHANNEL_OUTPUT_PDO(int16_t, EL4134);

static bool isTerminalSigned(int id) {
Expand Down

0 comments on commit f86effe

Please sign in to comment.