pioneers / runtime

Firmware for the PiE kit robots and devices
7 stars 2 forks source link

[MISC] Use <stdbool.h> for bool type #198

Open levincent06 opened 3 years ago

levincent06 commented 3 years ago

Among other ways to implement the bool type in C (ex: typedef, #define, more here: https://stackoverflow.com/a/1921557), using stdbool.h seems be the safest option.

We should start using this bool type across the Runtime repo and use it where applicable in the current code. An exception to using stdbool.h is for boolean values that are size-sensitive. For example, the param_val_t union should still use uint8_t for boolean values because we encode/decode booleans as 1-byte values in the lowcar protocol.