1 /* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12 property bool metric: true
14 function unit(value) {
15 return celsiusToFahrenheit(value).toFixed(1) + "\u00b0" + (metric ? "C" : "F")
18 function celsiusToFahrenheit(value) {
19 return (metric ? value : 1.8 * value + 32)
22 property real indoor: 20.4
23 property string indoorString: unit(indoor)
24 property real outdoor: 28.9
25 property string outdoorString: unit(outdoor)