Skip to content

Conversation

ELA-Pilgrim
Copy link
Collaborator

Features:

adding CANopen to the CANdle-sdk project
adding an eds parser to the project

return getDefaultConfigDir() + "candletoolco.ini";
}

inline bool fileExists(const std::string& filepath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use std::filesystem::path instead of string as windows cli has a different encoding for its paths than regular strings

}
}

MDCO::Error_t MDCO::writeOpenRegisters(const std::string& name, u32 data, u8 size, bool force)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want no type safety (converting anything to u32 with arbitrary size) we should at least provide helper functions with bit casts in order for the user to not be forced to do convoluted conversions themselves.

index=0x6077
subindex=0x00

# Display torque actual value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The motor should also demonstrate some kind of rotation in the impedance mode example


// kp
u32 kp_bits;
memcpy(&kp_bits, &(kp), sizeof(float));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memcpy should not be necessary for common API tasks


# make blink each driver led in ascending order
for i in range(len(ids)):
md = pc.MDCO(ids[i], candle);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolon at the end is invalid

cmake_minimum_required(VERSION 3.8)

# Shared sources
set(COMMON_SOURCES
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the sources are used by examples they should be located in the candlelib as it is the main interaction point for the users an their API

Copy link
Member

@PawelKorsak PawelKorsak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some architectural relocating is required as well as user API needs some more helper functions in order to make reading/writing possible without manual serialization and deserialization

return oss.str();
}

std::string toHex(u32 val, int width = 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those function (this and the one above) should be put under mab namespace to not collide with users code. More over they are very similar, one can be used to run another which lessens the complexity or they may even be one and the same function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants