From 5aee61635cecf3f4caf7cb3c974a710ff11eec47 Mon Sep 17 00:00:00 2001 From: John Buckman Date: Tue, 27 Apr 2021 11:26:14 +0800 Subject: [PATCH] bugfix: v1.0 users could not set calibration voltage, always said 'unknown' --- de1plus/skins/default/de1_skin_settings.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/de1plus/skins/default/de1_skin_settings.tcl b/de1plus/skins/default/de1_skin_settings.tcl index 705826a7..11b9c664 100644 --- a/de1plus/skins/default/de1_skin_settings.tcl +++ b/de1plus/skins/default/de1_skin_settings.tcl @@ -1239,11 +1239,11 @@ add_de1_text "calibrate calibrate2" 1280 290 -text [translate "Calibrate"] -font # IF you read 0, 1120, or 1230, you can write a new nominal voltage, which may be 120 or 230V add_de1_text "calibrate2" 350 450 -text [translate "Voltage"] -font Helv_11_bold -fill "#7f879a" -anchor "nw" -justify "left" - add_de1_variable "calibrate2" 1000 450 -text "" -font Helv_11_bold -fill "#4e85f4" -anchor "nw" -textvariable {[if {$::settings(heater_voltage) == "1230" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { return [subst {\[ [translate "Set to 120V"] \]}] } else { return "" }]} - add_de1_variable "calibrate2" 1600 450 -text "" -font Helv_11_bold -fill "#4e85f4" -anchor "nw" -textvariable {[if {$::settings(heater_voltage) == "1120" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { return [subst {\[ [translate "Set to 230V"] \]}] } else { return "" }]} + add_de1_variable "calibrate2" 1000 450 -text "" -font Helv_11_bold -fill "#4e85f4" -anchor "nw" -textvariable {[if {$::settings(heater_voltage) != "1120" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { return [subst {\[ [translate "Set to 120V"] \]}] } else { return "" }]} + add_de1_variable "calibrate2" 1600 450 -text "" -font Helv_11_bold -fill "#4e85f4" -anchor "nw" -textvariable {[if {$::settings(heater_voltage) != "1230" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { return [subst {\[ [translate "Set to 230V"] \]}] } else { return "" }]} - add_de1_button "calibrate2" {if {$::settings(heater_voltage) == "1230" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { if {$::android == 0} { set ::settings(heater_voltage) "1120" }; set_heater_voltage "120"; get_heater_voltage} } 1000 450 1450 600 "" - add_de1_button "calibrate2" {if {$::settings(heater_voltage) == "1120" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { if {$::android == 0} { set ::settings(heater_voltage) "1230" }; set_heater_voltage "230"; get_heater_voltage} } 1600 450 2050 600 "" + add_de1_button "calibrate2" {if {$::settings(heater_voltage) != "1120" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { if {$::android == 0} { set ::settings(heater_voltage) "1120" }; set_heater_voltage "120"; get_heater_voltage} } 1000 450 1450 600 "" + add_de1_button "calibrate2" {if {$::settings(heater_voltage) != "1230" || $::settings(heater_voltage) == "0" || $::settings(heater_voltage) == "" } { if {$::android == 0} { set ::settings(heater_voltage) "1230" }; set_heater_voltage "230"; get_heater_voltage} } 1600 450 2050 600 "" add_de1_variable "calibrate2" 700 450 -text [translate "Voltage"] -font Helv_11 -fill "#7f879a" -anchor "nw" -justify "left" -textvariable {[if {$::settings(heater_voltage) == "120" || $::settings(heater_voltage) == "1120"} { return "120V"