waterloo-rocketry / cansw_processor_airbrakes

Processor board was developed for the 2023-2024 design cycle to perform state estimation and control tasks for Borealis's airbrakes system
2 stars 0 forks source link

Add macros to enforce not using default printfs #32

Closed patrick-gu closed 3 months ago

patrick-gu commented 3 months ago

This is my contribution to code quality here.

This ensures that if you try to use a default printf-like function, you will get a compile error.

However, this will only work if you actually included the right printf header, so it might not be that effective. Maybe it could go in a different header?

celery6 commented 3 months ago

good for catching cases where you intended to use printf_ (and thus included the header) but just slipped and typed printf. happened to me before.

yeah its not foolproof, but no harm either