mirror of https://github.com/rusefi/rusefi.git
remote: update to release feature
This commit is contained in:
parent
8cad838dd4
commit
0f58c906e4
|
@ -16,7 +16,7 @@ do
|
||||||
# in java code that's UPDATE_RELEASE_SBC_EXIT_CODE magic number
|
# in java code that's UPDATE_RELEASE_SBC_EXIT_CODE magic number
|
||||||
if [ $exit_status -eq 17 ]; then
|
if [ $exit_status -eq 17 ]; then
|
||||||
echo Connector software update to latest was requested
|
echo Connector software update to latest was requested
|
||||||
bin/update_bundle_latest.sh
|
bin/update_bundle_release.sh
|
||||||
fi
|
fi
|
||||||
# in java code that's UPDATE_FIRMWARE_EXIT_CODE magic number
|
# in java code that's UPDATE_FIRMWARE_EXIT_CODE magic number
|
||||||
if [ $exit_status -eq 16 ]; then
|
if [ $exit_status -eq 16 ]; then
|
||||||
|
@ -28,7 +28,7 @@ do
|
||||||
# in java code that's UPDATE_RELEASE_FIRMWARE_EXIT_CODE magic number
|
# in java code that's UPDATE_RELEASE_FIRMWARE_EXIT_CODE magic number
|
||||||
if [ $exit_status -eq 18 ]; then
|
if [ $exit_status -eq 18 ]; then
|
||||||
echo Firmware update was requested
|
echo Firmware update was requested
|
||||||
bin/update_bundle_latest.sh
|
bin/update_bundle_release.sh
|
||||||
# todo: we need to start validating that SBC software matches board type, maybe update bundle type based on existing controller?
|
# todo: we need to start validating that SBC software matches board type, maybe update bundle type based on existing controller?
|
||||||
bin/dfu_switch_and_program.sh
|
bin/dfu_switch_and_program.sh
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -46,10 +46,11 @@ public class UpdateRequestHandler implements Take {
|
||||||
if (state == null)
|
if (state == null)
|
||||||
throw new IOException("Not acquired " + tuner);
|
throw new IOException("Not acquired " + tuner);
|
||||||
|
|
||||||
|
UpdateType type = UpdateType.valueOf(updateTypeString);
|
||||||
|
|
||||||
// should controller communication happen on http thread or not?
|
// should controller communication happen on http thread or not?
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
UpdateType type = UpdateType.valueOf(updateTypeString);
|
|
||||||
state.invokeOnlineCommand(type.getCode());
|
state.invokeOnlineCommand(type.getCode());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
|
@ -58,7 +59,7 @@ public class UpdateRequestHandler implements Take {
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
log.debug("Update request " + tuner);
|
log.debug("Update request " + tuner + " " + type);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
objectBuilder.add("result", "error: " + e);
|
objectBuilder.add("result", "error: " + e);
|
||||||
return new RsJson(objectBuilder.build());
|
return new RsJson(objectBuilder.build());
|
||||||
|
|
Loading…
Reference in New Issue