BotoX / xiaomi-m365-firmware-patcher

Automatize patching of Xiaomi Mijia M365 electric scooter firmware
https://m365.botox.bz
406 stars 107 forks source link

Feature request: switch between Eco and Normal mode with ONE click #24

Closed bibicu123 closed 5 years ago

bibicu123 commented 5 years ago

Hi !

Thank for your great work.

I wonder if it is possible to add a patch that enables us to switch between Normal and Eco mode with one click instead of a double click. And turn on/off the headlight with a double click.

The reason behind this is:

So during a journey I toggle between Eco/Normal modes many times, but I turn on the headlamp only once maybe.

So it would be much more user friendly to use one click for Normal/Eco and double click for headlight.

I know there is a Instant Switch from Normal to Eco patch, but it still needs a double click.

Thank you !

bibicu123 commented 5 years ago

I suppose the code is calling a subroutine based on a button event.

if(single_click) then call toggle_headlight(); if(double_click) then call toggle_normal_eco_mode();

Maybe you can find a way to reverse the calls.

if(single_click) then call toggle_normal_eco_mode(); if(double_click) then call toggle_headlight();

Regards

BotoX commented 5 years ago

The button code is actually in the BLE firmware and I'm not planning on patching the BLE firmware.