## v0.4.13
- Support for OMRON MX2 VFD.
+ - Better error handling in WiFi configuration.
+ - Fix open WiFi access.
## v0.4.12
- Segments straddle arc in linearization.
echo " wpa-pairwise CCMP TKIP"
echo " wpa-group CCMP TKIP"
echo " wpa-ssid \"$SSID\""
+
if [ ${#PASS} -ne 0 ]; then
- echo " wpa-psk \"$PASS\""
+ echo " wpa-psk \"$PASS\""
fi
}
exit 1
fi
- if [ ${#PASS} -lt 8 -o 128 -lt ${#PASS} ]; then
+ if [ ${#PASS} -ne 0 ]; then
+ if [ ${#PASS} -lt 8 -o 128 -lt ${#PASS} ]; then
echo "Invalid passsword"
exit 1
+ fi
fi
echo "$CHANNEL" | grep '^[0-9]\{1,2\}' > /dev/null
exit 1
fi
-
# Execute
if $AP; then
echo "Configuring Wifi access point"
set_password: function () {
if (this.password != this.password2) {
- api.alert('Passwords to not match');
+ alert('Passwords to not match');
return;
}
if (this.password.length < 6) {
- api.alert('Password too short');
+ alert('Password too short');
return;
}
config_wifi: function () {
this.wifiConfirm = false;
+ if (!this.wifi_ssid.length) {
+ alert('SSID not set');
+ return;
+ }
+
+ if (32 < this.wifi_ssid.length) {
+ alert('SSID longer than 32 characters');
+ return;
+ }
+
+ if (this.wifi_pass.length && this.wifi_pass.length < 8) {
+ alert('WiFi password shorter than 8 characters');
+ return;
+ }
+
+ if (128 < this.wifi_pass.length) {
+ alert('WiFi password longer than 128 characters');
+ return;
+ }
+
this.rebooting = true;
var config = {
- mode: this.wifi_mode,
+ mode: this.wifi_mode,
channel: this.wifi_ch,
- ssid: this.wifi_ssid,
- pass: this.wifi_pass
+ ssid: this.wifi_ssid,
+ pass: this.wifi_pass
}
api.put('wifi', config).fail(function (error) {