Skip to content

Commit

Permalink
S16_support
Browse files Browse the repository at this point in the history
  • Loading branch information
palachzzz committed Feb 29, 2024
1 parent 6628d1e commit ebe6f72
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/cooper/wheellog/MainPageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ class MainPageAdapter(private var pages: MutableList<Int>, val activity: MainAct
smartBms2PageValues.clear()
when (WheelData.getInstance().wheelType) {
WHEEL_TYPE.KINGSONG -> {
if (inArray(WheelData.getInstance().model, arrayOf("KS-S20", "KS-S22"))) {
if (inArray(WheelData.getInstance().model, arrayOf("KS-S20", "KS-S22", "KS-S19", "KS-S16"))) {
addPage(R.layout.main_view_smart_bms, 2)
setupFieldForSmartBmsPage(R.string.bmsSn)
setupFieldForSmartBmsPage(R.string.bmsFw)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public void setLightMode(int lightMode) {

private boolean is84vWheel() {
WheelData wd = WheelData.getInstance();
return StringUtil.inArray(wd.getModel(), new String[]{"KS-18L", "KS-16X", "KS-16XF", "RW", "KS-18LH", "KS-18LY", "KS-S18"})
return StringUtil.inArray(wd.getModel(), new String[]{"KS-18L", "KS-16X", "KS-16XF", "RW", "KS-18LH", "KS-18LY", "KS-S18", "KS-S16"})
|| wd.getName().startsWith("ROCKW") // support rockwheel models
|| wd.getBtName().compareTo("RW") == 0;
}
Expand Down
35 changes: 35 additions & 0 deletions app/src/main/res/raw/bluetooth_services.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,41 @@
"0000ffe1-0000-1000-8000-00805f9b34fb"
]
},
{
"adapter": "kingsong",
"00001800-0000-1000-8000-00805f9b34fb": [
"00002a00-0000-1000-8000-00805f9b34fb",
"00002a01-0000-1000-8000-00805f9b34fb",
"00002a04-0000-1000-8000-00805f9b34fb",
"00002ac9-0000-1000-8000-00805f9b34fb"
],
"00001801-0000-1000-8000-00805f9b34fb": [
"00002a05-0000-1000-8000-00805f9b34fb"
],
"0000180a-0000-1000-8000-00805f9b34fb": [
"00002a23-0000-1000-8000-00805f9b34fb",
"00002a24-0000-1000-8000-00805f9b34fb",
"00002a25-0000-1000-8000-00805f9b34fb",
"00002a26-0000-1000-8000-00805f9b34fb",
"00002a27-0000-1000-8000-00805f9b34fb",
"00002a28-0000-1000-8000-00805f9b34fb",
"00002a29-0000-1000-8000-00805f9b34fb",
"00002a50-0000-1000-8000-00805f9b34fb"
],
"02f00000-0000-0000-0000-00000000fe00": [
"02f00000-0000-0000-0000-00000000ff03",
"02f00000-0000-0000-0000-00000000ff02",
"02f00000-0000-0000-0000-00000000ff00",
"02f00000-0000-0000-0000-00000000ff01"
],
"0000ffe0-0000-1000-8000-00805f9b34fb": [
"0000ffe1-0000-1000-8000-00805f9b34fb",
"0000fff3-0000-1000-8000-00805f9b34fb",
"0000fff5-0000-1000-8000-00805f9b34fb",
"0783b03e-8535-b5a0-7140-a304d2495cba",
"0783b03e-8535-b5a0-7140-a304d2495cb8"
]
},
{
"adapter": "kingsong",
"00001800-0000-1000-8000-00805f9b34fb": [
Expand Down

0 comments on commit ebe6f72

Please sign in to comment.