Results 181 comments of Dean Lee

Cannot put the definition of `offroad_alerts` out of class. otherwise the string will be initialized after the program starts and before `installTranslator` is called.

It is true that the correct size should be `msg->getSize() / sizeof(capnp::word))`. but I suspect that your crash is because the data (`msg->getData()`) is not word aligned at all. FlatArrayMessageReader...

![Screenshot from 2022-10-18 17-59-43](https://user-images.githubusercontent.com/27770/196399900-89e9c65c-e8ce-48f0-aa26-bf16307700a4.png)

need to figure out a way to remove mutex

closed and opened a new pr at https://github.com/commaai/openpilot/pull/26189

a custom SelectionModel has beed added to https://github.com/commaai/openpilot/pull/26097. I recommend merging 26097 first. so that this PR can be done better with less code base on 26097.

almost done.may need to add some bounds checks. ![cc3](https://user-images.githubusercontent.com/27770/196129846-15a3f395-34ed-4238-97e2-5dfe254ef831.png)

Fixed a crash caused by different data size for the same address from different bus

Need to merge https://github.com/commaai/openpilot/pull/25720 first to Initialize and open camera in AbstractCamera

All camera-related parameters and functions have been moved to separate files. there is no `if CAMERA_ID_AR0231 else` in qcom2 anymore