wii ec upd

This commit is contained in:
RogueMaster
2022-11-23 15:34:15 -05:00
parent 5dac01628a
commit 311744f1bc
3 changed files with 33 additions and 1 deletions
@@ -57,6 +57,14 @@ bool evWiiEC(const eventMsg_t* const msg, state_t* const state) {
state->calib = CAL_TRACK;
sceneSet(state, ecId[msg->wiiEc.val].scene);
redraw = true;
#if 1 // Workaround for Classic Controller Pro, which shows 00's for Factory Calibration Data!?
if(state->ec.pidx == PID_CLASSIC_PRO) {
// Simulate a Long-OK keypress, to start Software Calibration mode
eventMsg_t msg = {input.type = InputTypeLong, input.key = InputKeyOk};
key_calib(&msg, state);
}
#endif
break;
case WIIEC_DISCONN:
@@ -79,7 +87,7 @@ bool evWiiEC(const eventMsg_t* const msg, state_t* const state) {
}
#if 1 //! factory calibration method not known for classic triggers - this will set the digital switch point
if(state->ec.pidx == PID_CLASSIC) {
if((state->ec.pidx == PID_CLASSIC) || (state->ec.pidx == PID_CLASSIC_PRO)) {
if(msg->wiiEc.in == 'l') state->ec.calS.classic[2].trgZL = msg->wiiEc.val;
if(msg->wiiEc.in == 'r') state->ec.calS.classic[2].trgZR = msg->wiiEc.val;
}
+22
View File
@@ -39,6 +39,17 @@ const ecId_t ecId[PID_CNT] = {
nunchuck_show,
nunchuck_key},
[PID_NUNCHUCK_R2] =
{{0xFF, 0x00, 0xA4, 0x20, 0x00, 0x00},
"Nunchuck (rev2)",
SCENE_NUNCHUCK,
NULL,
nunchuck_decode,
nunchuck_msg,
nunchuck_calib,
nunchuck_show,
nunchuck_key},
[PID_CLASSIC] =
{{0x00, 0x00, 0xA4, 0x20, 0x01, 0x01},
"Classic Controller",
@@ -50,6 +61,17 @@ const ecId_t ecId[PID_CNT] = {
classic_show,
classic_key},
[PID_CLASSIC_PRO] =
{{0x01, 0x00, 0xA4, 0x20, 0x01, 0x01},
"Classic Controller Pro",
SCENE_CLASSIC,
NULL,
classic_decode,
classic_msg,
classic_calib,
classic_show,
classic_key},
[PID_BALANCE] =
{{0x00, 0x00, 0xA4, 0x20, 0x04, 0x02},
"Balance Board",
@@ -66,7 +66,9 @@ typedef enum ecPid {
PID_NUNCHUCK = PID_FIRST,
// If you're wise, ONLY edit this section
PID_NUNCHUCK_R2,
PID_CLASSIC,
PID_CLASSIC_PRO,
PID_BALANCE,
PID_GH_GUITAR,
PID_GH_DRUMS,