move currentTemp

This commit is contained in:
Karl Hudgell 2020-09-28 16:14:42 +01:00
parent fd9365c174
commit c94bacb71e

View File

@ -95,7 +95,13 @@ module.exports = {
},
weather: async (city, weatherDescription, currentTemp, highTemp, lowTemp) => {
weatherDescription = weatherDescription.replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase());
lcd.printLineSync(2, weatherDescription + ' - ' + currentTemp + '\xDF')
if (currentTemp.toString().length == 2) {
lcd.printLineSync(1, ' ' + currentTemp + '\xDF')
} else {
lcd.printLineSync(1, ' ' + currentTemp + '\xDF')
}
lcd.printLineSync(2, weatherDescription)
lcd.printLineSync(3, 'High-' + highTemp + '\xDF' + ' / ' + 'Low-' + lowTemp + '\xDF')
}
}