Re: the CAN bus adapter. I understand that removing the two wires is likely to help. My question was if a software fix is likely to happen as well (without removing them) or if the only way to address it is to proceed with removing them.
Re: the lane watch camera. I imagine the current algorithm in your code looks something like this:
bool is_right_turn_signal_on = false;
bool show_lane_watch_camera = false;
// called when the unit observes a lane watch camera button press
function handle_lane_watch_button_press() {
show_lane_watch_camera = !show_lane_watch_camera;
}
// called when the CAN bus observes the right turn signal state
function handle_right_turn_signal_change(bool new_turn_signal_on) {
is_right_turn_signal_on= new_turn_signal_on;
}
// code running as part of some larger main loop
function main() {
while (true) {
if (is_right_turn_signal_on) {
show_lane_watch_camera = true;
}
if (show_lane_watch_camera) {
show_front_camera();
}
}
}
In that pseudo-code, you can see that as long as the right turn signal is on, there is no way to turn off the lane watch camera. Even if you press the button to toggle the lane watch camera, it will still turn it right back on as long as the turn signal is still on.
My request is to do what the OEM system did, which is allow the lane watch button to turn off the camera even in this situation.
Psuedo-code for what the fix might look like is:
bool is_right_turn_signal_on = false;
bool show_lane_watch_camera = false;
// called when the unit observes a lane watch camera button press
function handle_lane_watch_button_press() {
show_lane_watch_camera = !show_lane_watch_camera;
}
// called when the CAN bus observes the right turn signal state
function handle_right_turn_signal_change(bool new_turn_signal_on) {
if (new_turn_signal_on != is_right_turn_signal_on) {
show_lane_watch_camera = new_turn_signal_on;
}
is_right_turn_signal_on = new_turn_signal_on;
}
// code running as part of some larger main loop
function main() {
while (true) {
if (show_lane_watch_camera) {
show_front_camera();
}
}
}
The above pseudo-code matches how the OEM system worked. The button always toggles the camera and the turn signal is also respected when it changes state (turn on signal => camera view turns on, turn off signal => camera view turns off).