Add popup to update DualSense firmware if too old
This commit is contained in:
parent
5f7480e028
commit
cbd6237ddd
26
core.js
26
core.js
@ -469,6 +469,7 @@ async function ds4_nvunlock() {
|
||||
}
|
||||
|
||||
async function ds5_info() {
|
||||
try {
|
||||
const view = lf("ds5_info", await device.receiveFeatureReport(0x20));
|
||||
|
||||
var cmd = view.getUint8(0, true);
|
||||
@ -507,8 +508,20 @@ async function ds5_info() {
|
||||
'<svg class="bi" width="1.3em" height="1.3em"><use xlink:href="#info"/></svg></a>';
|
||||
append_info(l("Board Model:"), ds5_hw_to_bm(hwinfo) + b_info);
|
||||
|
||||
old_controller = build_date.search(/ 2020| 2021/);
|
||||
if(old_controller != -1) {
|
||||
la("ds5_info_error", {"r": "old"})
|
||||
disable_btn = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
await ds5_nvstatus();
|
||||
await ds5_getbdaddr();
|
||||
} catch(e) {
|
||||
la("ds5_info_error", {"r": e})
|
||||
show_popup(l("Cannot read controller information"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -871,8 +884,8 @@ async function continue_connection(report) {
|
||||
if(reportLen != 63) {
|
||||
$("#btnconnect").prop("disabled", false);
|
||||
$("#connectspinner").hide();
|
||||
show_popup(l("Please connect the device using a USB cable."))
|
||||
disconnect();
|
||||
show_popup(l("Please connect the device using a USB cable."))
|
||||
return;
|
||||
}
|
||||
|
||||
@ -917,10 +930,18 @@ async function continue_connection(report) {
|
||||
$("#resetBtn").show();
|
||||
$("#d-nvstatus").text = l("Unknown");
|
||||
$("#d-bdaddr").text = l("Unknown");
|
||||
} else {
|
||||
show_popup(l("Connected invalid device: ") + l("Error 1"));
|
||||
$("#btnconnect").prop("disabled", false);
|
||||
$("#connectspinner").hide();
|
||||
disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
if(disable_btn) {
|
||||
if(device.productId == 0x0df2) {
|
||||
if(device.productId == 0x0ce6) {
|
||||
show_popup(l("This DualSense controller has outdated firmware.") + "<br>" + l("Please update the firmware and try again."), true);
|
||||
} else if(device.productId == 0x0df2) {
|
||||
show_popup(l("Calibration of the DualSense Edge is not currently supported."));
|
||||
} else {
|
||||
show_popup(l("The device appears to be a DS4 clone. All functionalities are disabled."));
|
||||
@ -1370,5 +1391,4 @@ function lang_translate(target_file, target_lang) {
|
||||
}
|
||||
$("#curLang").html(available_langs[target_lang]["name"]);
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -161,6 +161,8 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,8 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,8 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,8 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -162,5 +162,7 @@
|
||||
"Board model detection thanks to": "Az alaplapfelismerési funkciőért köszönet neki:",
|
||||
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,8 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "Scrivimi se il modello della scheda del tuo controller non viene riconosciuto correttamente.",
|
||||
"Board model detection thanks to": "Rilevamento del modello della scheda grazie a",
|
||||
"Please connect the device using a USB cable.": "Connetti il controller usando un cavo USB.",
|
||||
"This DualSense controller has outdated firmware.": "Questo controller DualSense ha un firmware non aggiornato.",
|
||||
"Please update the firmware and try again.": "Aggiorna il firmware e riprova.",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,9 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -162,5 +162,8 @@
|
||||
"Board model detection thanks to": "Podziękowania dla osoby która wykryła model płytki",
|
||||
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,9 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,9 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -161,6 +161,9 @@
|
||||
"Please let me know if the board model of your controller is not detected correctly.": "",
|
||||
"Board model detection thanks to": "",
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
@ -162,5 +162,8 @@
|
||||
"Board model detection thanks to": "主板型号检测功能需要感谢",
|
||||
|
||||
"Please connect the device using a USB cable.": "",
|
||||
"This DualSense controller has outdated firmware.": "",
|
||||
"Please update the firmware and try again.": "",
|
||||
|
||||
"": ""
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user