Bare with me as I might be totally off base but fingers crossed the logic is sound
So basically in my car I have multiple canbus buttons I would like to map but using the Raise VW(PQ) option I believe the limitation is within the head unit to the following buttons:
SWC_KEY_VOLUME_UP = 0x01;
SWC_KEY_VOLUME_DOWN = 0x02;
SWC_KEY_MENU_UP = 0x03;
SWC_KEY_MENU_DOWN = 0x04;
SWC_KEY_TEL = 0x05;
SWC_KEY_MUTE = 0x06;
SWC_KEY_SRC = 0x07;
SWC_KEY_MIC = 0x08;
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_UP, VehiclePropertyConstants.USER_KEY_DOWN);//上下取反
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_DOWN, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_TEL, VehiclePropertyConstants.USER_KEY_BLUETOOTH);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MUTE, VehiclePropertyConstants.USER_KEY_MUTE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SRC, VehiclePropertyConstants.USER_KEY_SOURCE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MIC, VehiclePropertyConstants.USER_KEY_VOICE);
However I have found this link: https://github.com/darkspr1te/Work/blob/master/MctCoreServices/src/com/mct/carmodels/RZC_ToyotaSeriesProtocol.java
This shows a lot more available buttons which the head unit should understand:
SWC_KEY_VOLUME_UP = 0x01;
SWC_KEY_VOLUME_DOWN = 0x02;
SWC_KEY_MENU_RIGHT = 0x03;
SWC_KEY_MENU_LEFT = 0x04;
SWC_KEY_SRC = 0x07;
SWC_KEY_SPEECH = 0x08;
SWC_KEY_PICK_UP = 0x09;
SWC_KEY_HANG_UP = 0x0A;
SWC_KEY_BOX = 0x0B;
SWC_KEY_MENU_UP = 0x13;
SWC_KEY_MENU_DOWN = 0x14;
SWC_KEY_BACK = 0x15;
SWC_KEY_ENTER = 0x16;
SCROLL_KEY_VOLUME_UP = 0x81;
SCROLL_KEY_VOLUME_DOWN = 0x82;
SCROLL_KEY_CH_FLD_UP = 0x83;
SCROLL_KEY_CH_FLD_DOWN = 0x84;
SCROLL_KEY_TUNE_TRACK_UP = 0x85;
SCROLL_KEY_TUNE_TRACK_DOWN = 0x86;
SWC_KEY_POWER = 0x87;
SWC_KEY_MODE = 0x88;
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_LEFT, VehiclePropertyConstants.USER_KEY_UP);//VehiclePropertyConstants.USER_KEY_LEFT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_RIGHT, VehiclePropertyConstants.USER_KEY_DOWN);//VehiclePropertyConstants.USER_KEY_RIGHT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SRC, VehiclePropertyConstants.USER_KEY_SOURCE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SPEECH, VehiclePropertyConstants.USER_KEY_VOICE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_PICK_UP, VehiclePropertyConstants.USER_KEY_PHONE_ACCEPT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_HANG_UP, VehiclePropertyConstants.USER_KEY_PHONE_HANGUP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_BOX,VehiclePropertyConstants.USER_KEY_HOME);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_UP, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_DOWN, VehiclePropertyConstants.USER_KEY_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_BACK, VehiclePropertyConstants.USER_KEY_BACK);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_ENTER, VehiclePropertyConstants.USER_KEY_OK);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_CH_FLD_UP, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_CH_FLD_DOWN, VehiclePropertyConstants.USER_KEY_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_TUNE_TRACK_UP, VehiclePropertyConstants.USER_KEY_RADIO_STEP_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_TUNE_TRACK_DOWN, VehiclePropertyConstants.USER_KEY_RADIO_STEP_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_POWER, VehiclePropertyConstants.USER_KEY_POWER);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MODE, VehiclePropertyConstants.USER_KEY_MODE);
So my theory is that if we emulate as this Toyota instead of the VW I could potentially remap keys to any of the above? This would be great if I could map some back and home buttons as well as having proper accept and hangup buttons too
What do you think?
I am willing to test this...
Bare with me as I might be totally off base but fingers crossed the logic is sound
So basically in my car I have multiple canbus buttons I would like to map but using the Raise VW(PQ) option I believe the limitation is within the head unit to the following buttons:
SWC_KEY_VOLUME_UP = 0x01;
SWC_KEY_VOLUME_DOWN = 0x02;
SWC_KEY_MENU_UP = 0x03;
SWC_KEY_MENU_DOWN = 0x04;
SWC_KEY_TEL = 0x05;
SWC_KEY_MUTE = 0x06;
SWC_KEY_SRC = 0x07;
SWC_KEY_MIC = 0x08;
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_UP, VehiclePropertyConstants.USER_KEY_DOWN);//上下取反
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_DOWN, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_TEL, VehiclePropertyConstants.USER_KEY_BLUETOOTH);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MUTE, VehiclePropertyConstants.USER_KEY_MUTE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SRC, VehiclePropertyConstants.USER_KEY_SOURCE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MIC, VehiclePropertyConstants.USER_KEY_VOICE);
However I have found this link: https://github.com/darkspr1te/Work/blob/master/MctCoreServices/src/com/mct/carmodels/RZC_ToyotaSeriesProtocol.java
This shows a lot more available buttons which the head unit should understand:
SWC_KEY_VOLUME_UP = 0x01;
SWC_KEY_VOLUME_DOWN = 0x02;
SWC_KEY_MENU_RIGHT = 0x03;
SWC_KEY_MENU_LEFT = 0x04;
SWC_KEY_SRC = 0x07;
SWC_KEY_SPEECH = 0x08;
SWC_KEY_PICK_UP = 0x09;
SWC_KEY_HANG_UP = 0x0A;
SWC_KEY_BOX = 0x0B;
SWC_KEY_MENU_UP = 0x13;
SWC_KEY_MENU_DOWN = 0x14;
SWC_KEY_BACK = 0x15;
SWC_KEY_ENTER = 0x16;
SCROLL_KEY_VOLUME_UP = 0x81;
SCROLL_KEY_VOLUME_DOWN = 0x82;
SCROLL_KEY_CH_FLD_UP = 0x83;
SCROLL_KEY_CH_FLD_DOWN = 0x84;
SCROLL_KEY_TUNE_TRACK_UP = 0x85;
SCROLL_KEY_TUNE_TRACK_DOWN = 0x86;
SWC_KEY_POWER = 0x87;
SWC_KEY_MODE = 0x88;
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_LEFT, VehiclePropertyConstants.USER_KEY_UP);//VehiclePropertyConstants.USER_KEY_LEFT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_RIGHT, VehiclePropertyConstants.USER_KEY_DOWN);//VehiclePropertyConstants.USER_KEY_RIGHT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SRC, VehiclePropertyConstants.USER_KEY_SOURCE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_SPEECH, VehiclePropertyConstants.USER_KEY_VOICE);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_PICK_UP, VehiclePropertyConstants.USER_KEY_PHONE_ACCEPT);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_HANG_UP, VehiclePropertyConstants.USER_KEY_PHONE_HANGUP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_BOX,VehiclePropertyConstants.USER_KEY_HOME);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_UP, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MENU_DOWN, VehiclePropertyConstants.USER_KEY_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_BACK, VehiclePropertyConstants.USER_KEY_BACK);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_ENTER, VehiclePropertyConstants.USER_KEY_OK);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_VOLUME_UP, VehiclePropertyConstants.USER_KEY_VOLUME_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_VOLUME_DOWN, VehiclePropertyConstants.USER_KEY_VOLUME_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_CH_FLD_UP, VehiclePropertyConstants.USER_KEY_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_CH_FLD_DOWN, VehiclePropertyConstants.USER_KEY_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_TUNE_TRACK_UP, VehiclePropertyConstants.USER_KEY_RADIO_STEP_UP);
SWC_KEY_TO_USER_KEY_TABLE.put(SCROLL_KEY_TUNE_TRACK_DOWN, VehiclePropertyConstants.USER_KEY_RADIO_STEP_DOWN);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_POWER, VehiclePropertyConstants.USER_KEY_POWER);
SWC_KEY_TO_USER_KEY_TABLE.put(SWC_KEY_MODE, VehiclePropertyConstants.USER_KEY_MODE);
So my theory is that if we emulate as this Toyota instead of the VW I could potentially remap keys to any of the above? This would be great if I could map some back and home buttons as well as having proper accept and hangup buttons too
What do you think?
I am willing to test this...