Comment on English being the only supported pump language so far.

This commit is contained in:
Johannes Mockenhaupt 2017-07-24 02:24:30 +02:00
parent 5e5c837949
commit 6a0273046d
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -259,10 +259,12 @@ public class SetTbrCommand implements Command {
boolean alertProcessed = false; boolean alertProcessed = false;
while (System.currentTimeMillis() < inTwoSeconds && !alertProcessed) { while (System.currentTimeMillis() < inTwoSeconds && !alertProcessed) {
if (scripter.currentMenu.getType() == MenuType.WARNING_OR_ERROR) { if (scripter.currentMenu.getType() == MenuType.WARNING_OR_ERROR) {
// check the raised alarm is TBR CANCELLED. // Check the raised alarm is TBR CANCELLED, so we're not accidentally cancelled
// note that the message is permanently displayed, while the error code is blinking. // a different that might be raised at the same time.
// wait till the error code can be read results in the code hanging, despite // Note that the message is permanently displayed, while the error code is blinking.
// menu updates coming in, so just check the message // A wait till the error code can be read results in the code hanging, despite
// menu updates coming in, so just check the message.
// TODO v2 this only works when the pump's language is English
String errorMsg = (String) scripter.currentMenu.getAttribute(MenuAttribute.MESSAGE); String errorMsg = (String) scripter.currentMenu.getAttribute(MenuAttribute.MESSAGE);
if (!errorMsg.equals("TBR CANCELLED")) { if (!errorMsg.equals("TBR CANCELLED")) {
throw new CommandException().success(false).enacted(false) throw new CommandException().success(false).enacted(false)