Merge pull request #3911 from RKBoss6/iosWeatherUpdates
[iOS] Add feels-like value parsing for weather app supportmaster
commit
853e395083
|
|
@ -17,4 +17,5 @@
|
||||||
0.16: Always request Current Time service from iOS
|
0.16: Always request Current Time service from iOS
|
||||||
0.17: Default to passing full UTF8 strings into messages app (which can now process them with an international font)
|
0.17: Default to passing full UTF8 strings into messages app (which can now process them with an international font)
|
||||||
0.18: Fix UTF8 conversion (check for `font` library, not `fonts`)
|
0.18: Fix UTF8 conversion (check for `font` library, not `fonts`)
|
||||||
0.19: Convert numeric weather values to int from BangleDumpWeather shortcut
|
0.19: Convert numeric weather values to int from BangleDumpWeather shortcut
|
||||||
|
0.20: Add feels-like temperature data field to weather parsing from BangleDumpWeather shortcut.
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ E.on('notify',msg=>{
|
||||||
let weatherEvent = {
|
let weatherEvent = {
|
||||||
t: "weather",
|
t: "weather",
|
||||||
temp: d.temp,
|
temp: d.temp,
|
||||||
|
feels: d.feels,
|
||||||
hi: d.hi,
|
hi: d.hi,
|
||||||
lo: d.lo,
|
lo: d.lo,
|
||||||
hum: d.hum,
|
hum: d.hum,
|
||||||
|
|
@ -192,7 +193,7 @@ E.on('notify',msg=>{
|
||||||
loc: d.loc
|
loc: d.loc
|
||||||
}
|
}
|
||||||
// Convert string fields to numbers for iOS weather shortcut
|
// Convert string fields to numbers for iOS weather shortcut
|
||||||
const numFields = ['code', 'wdir', 'temp', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain'];
|
const numFields = ['code', 'wdir', 'temp','feels', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain'];
|
||||||
numFields.forEach(field => {
|
numFields.forEach(field => {
|
||||||
if (weatherEvent[field] != null) weatherEvent[field] = +weatherEvent[field];
|
if (weatherEvent[field] != null) weatherEvent[field] = +weatherEvent[field];
|
||||||
});
|
});
|
||||||
|
|
@ -345,4 +346,4 @@ E.emit("ANCS", {
|
||||||
} else {
|
} else {
|
||||||
Bangle.ancsConvertUTF8 = E.asUTF8;
|
Bangle.ancsConvertUTF8 = E.asUTF8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"id": "ios",
|
"id": "ios",
|
||||||
"name": "iOS Integration",
|
"name": "iOS Integration",
|
||||||
"version": "0.19",
|
"version": "0.20",
|
||||||
"description": "Display notifications/music/etc from iOS devices",
|
"description": "Display/pull notifications, music, weather, and agenda from iOS devices",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tool,system,ios,apple,messages,notifications",
|
"tags": "tool,system,ios,apple,messages,notifications",
|
||||||
"dependencies": {"messages":"module"},
|
"dependencies": {"messages":"module"},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue