mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
Google Maps: Added more recognised icons - needed another enum for going all the way around a roundabout
This commit is contained in:
parent
0b241af8e7
commit
1fa8936544
@ -37,7 +37,7 @@ public class GoogleMapsNotificationHandler {
|
||||
public GoogleMapsNotificationHandler() {
|
||||
knownImages = new ArrayList<>();
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_CONTINUE, new int[]{
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000, // Straight on with gaps
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
@ -240,6 +240,143 @@ public class GoogleMapsNotificationHandler {
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_UTURN_LEFT, new int[]{
|
||||
0b00000000000000000000000000000000, // LHD
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000001111110000000000,
|
||||
0b00000000000000111111111100000000,
|
||||
0b00000000000001111111111110000000,
|
||||
0b00000000000011111000111111000000,
|
||||
0b00000000000111100000001111100000,
|
||||
0b00000000001111000000000111100000,
|
||||
0b00000000001111000000000011110000,
|
||||
0b00000000001110000000000011110000,
|
||||
0b00000000001110000000000001110000,
|
||||
0b00000000001110000000000001110000,
|
||||
0b00000000001110000000000001110000,
|
||||
0b00001100001110001100000001110000,
|
||||
0b00011110001110011110000001110000,
|
||||
0b00001111001110111110000001110000,
|
||||
0b00001111101111111100000001110000,
|
||||
0b00000111111111111000000001110000,
|
||||
0b00000011111111110000000001110000,
|
||||
0b00000001111111100000000001110000,
|
||||
0b00000000111111000000000001110000,
|
||||
0b00000000001110000000000001110000,
|
||||
0b00000000001100000000000001110000,
|
||||
0b00000000000000000000000001110000,
|
||||
0b00000000000000000000000001110000,
|
||||
0b00000000000000000000000001110000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_UTURN_RIGHT, new int[]{
|
||||
0b00000000000000000000000000000000, // RHD
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000001111110000000000000000,
|
||||
0b00000000111111111100000000000000,
|
||||
0b00000001111111111110000000000000,
|
||||
0b00000011111100011111000000000000,
|
||||
0b00000111110000000111100000000000,
|
||||
0b00000111100000000011110000000000,
|
||||
0b00001111000000000011110000000000,
|
||||
0b00001111000000000001110000000000,
|
||||
0b00001110000000000001110000000000,
|
||||
0b00001110000000000001110000000000,
|
||||
0b00001110000000000001110000000000,
|
||||
0b00001110000000110001110000110000,
|
||||
0b00001110000001111001110001111000,
|
||||
0b00001110000001111101110011110000,
|
||||
0b00001110000000111111110111110000,
|
||||
0b00001110000000011111111111100000,
|
||||
0b00001110000000001111111111000000,
|
||||
0b00001110000000000111111110000000,
|
||||
0b00001110000000000011111100000000,
|
||||
0b00001110000000000001110000000000,
|
||||
0b00001110000000000000110000000000,
|
||||
0b00001110000000000000000000000000,
|
||||
0b00001110000000000000000000000000,
|
||||
0b00001110000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_KEEP_LEFT, new int[]{
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000001000000000000000,
|
||||
0b00000000000000011100000000000000,
|
||||
0b00000000000001111110000000000000,
|
||||
0b00000000000001111111000000000000,
|
||||
0b00000000000011111111100000000000,
|
||||
0b00000000001111111111110000000000,
|
||||
0b00000000011111011111111000000000,
|
||||
0b00000000011110011101111100000000,
|
||||
0b00000000111100011100111100000000,
|
||||
0b00000000011000011100011000000000,
|
||||
0b00000000000000011100000000000000,
|
||||
0b00000000000000011100000000000000,
|
||||
0b00000000000000011110000000000000,
|
||||
0b00000000000000011110000000000000,
|
||||
0b00000000000000011111000000000000,
|
||||
0b00000000000000001111100000000000,
|
||||
0b00000000000000000111110000000000,
|
||||
0b00000000000000000011111000000000,
|
||||
0b00000000000000000001111000000000,
|
||||
0b00000000000000000000111100000000,
|
||||
0b00000000000000000000011100000000,
|
||||
0b00000000000000000000011110000000,
|
||||
0b00000000000000000000001110000000,
|
||||
0b00000000000000000000001110000000,
|
||||
0b00000000000000000000001110000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_KEEP_RIGHT, new int[]{
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000010000000000000000,
|
||||
0b00000000000000111000000000000000,
|
||||
0b00000000000001111110000000000000,
|
||||
0b00000000000011111110000000000000,
|
||||
0b00000000000111111111000000000000,
|
||||
0b00000000001111111111110000000000,
|
||||
0b00000000011111111011111000000000,
|
||||
0b00000000111110111001111000000000,
|
||||
0b00000000111100111000111100000000,
|
||||
0b00000000011000111000011000000000,
|
||||
0b00000000000000111000000000000000,
|
||||
0b00000000000000111000000000000000,
|
||||
0b00000000000001111000000000000000,
|
||||
0b00000000000001111000000000000000,
|
||||
0b00000000000011111000000000000000,
|
||||
0b00000000000111110000000000000000,
|
||||
0b00000000001111100000000000000000,
|
||||
0b00000000011111000000000000000000,
|
||||
0b00000000011110000000000000000000,
|
||||
0b00000000111100000000000000000000,
|
||||
0b00000000111000000000000000000000,
|
||||
0b00000001111000000000000000000000,
|
||||
0b00000001110000000000000000000000,
|
||||
0b00000001110000000000000000000000,
|
||||
0b00000001110000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
}));
|
||||
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_FINISH, new int[]{
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
@ -275,7 +412,7 @@ public class GoogleMapsNotificationHandler {
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_FINISH, new int[]{
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000, // RHD
|
||||
0b00000000111000000000000000000000,
|
||||
0b00000111111110000000000000000000,
|
||||
0b00001111111111100000000000000000,
|
||||
@ -308,6 +445,40 @@ public class GoogleMapsNotificationHandler {
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_FINISH, new int[]{
|
||||
0b00000000000000000000000000000000, // LHD
|
||||
0b00000000000000000000011100000000,
|
||||
0b00000000000000000011111111100000,
|
||||
0b00000000000000000111111111110000,
|
||||
0b00000000000000001111000001111000,
|
||||
0b00000000000000001110000000111100,
|
||||
0b00000000000000011100000000011100,
|
||||
0b00000000000000011100001000001100,
|
||||
0b00000000000000011000011100001110,
|
||||
0b00000000000000011000011110001110,
|
||||
0b00000000000000011000011100001110,
|
||||
0b00000000000000011100000000001100,
|
||||
0b00000000000000011100000000011100,
|
||||
0b00000000000000001110000000011100,
|
||||
0b00000000000000001110000000111000,
|
||||
0b00000111100011000111000000111000,
|
||||
0b00000111100011100111000001110000,
|
||||
0b00000111111111100011100011110000,
|
||||
0b00001111111111110011110011100000,
|
||||
0b00001111111111111001110111000000,
|
||||
0b00001111100011111000111110000000,
|
||||
0b00011111100011111100011110000000,
|
||||
0b00011111100011111100011100000000,
|
||||
0b00011111111111111110001000000000,
|
||||
0b00111111111111111110000000000000,
|
||||
0b00111111100011111110000000000000,
|
||||
0b00111111100011111111000000000000,
|
||||
0b01111111100011111111000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_ROUNDABOUT_LEFT, new int[]{
|
||||
0b000000000000000000000000000000000,
|
||||
0b000000000000000000000000000000000,
|
||||
@ -648,6 +819,74 @@ public class GoogleMapsNotificationHandler {
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_ROUNDABOUT_UTURN, new int[]{
|
||||
0b00000000000000000000000000000000, // LHD
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000001111111000000000000,
|
||||
0b00000000000011111111110000000000,
|
||||
0b00000000000111111111110000000000,
|
||||
0b00000000001111100001111000000000,
|
||||
0b00000000001111000000111100000000,
|
||||
0b00000000011110000000111100000000,
|
||||
0b00000000011110000000011100000000,
|
||||
0b00000000011110000000011100000000,
|
||||
0b00000000011110000000111100000000,
|
||||
0b00000000001111000000111100000000,
|
||||
0b00000000001111100001111000000000,
|
||||
0b00000000000111110011110000000000,
|
||||
0b00000000000011110011110000000000,
|
||||
0b00000000000011110010000000000000,
|
||||
0b00000000000011110000000000000000,
|
||||
0b00000001100011110001100000000000,
|
||||
0b00000011110011110011110000000000,
|
||||
0b00000001111011110111110000000000,
|
||||
0b00000000111111111111100000000000,
|
||||
0b00000000011111111111000000000000,
|
||||
0b00000000001111111110100000000000,
|
||||
0b00000000000111111101100000000000,
|
||||
0b00000000000011111011100000000000,
|
||||
0b00000000000001110011100000000000,
|
||||
0b00000000000000100011100000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
}));
|
||||
knownImages.add(new IconType(NavigationInfoSpec.ACTION_ROUNDABOUT_UTURN, new int[]{
|
||||
0b00000000000000000000000000000000, // RHD
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000011111110000000000000,
|
||||
0b00000000001111111111000000000000,
|
||||
0b00000000001111111111100000000000,
|
||||
0b00000000011110000111110000000000,
|
||||
0b00000000111100000011110000000000,
|
||||
0b00000000111100000001111000000000,
|
||||
0b00000000111000000001111000000000,
|
||||
0b00000000111000000001111000000000,
|
||||
0b00000000111100000001111000000000,
|
||||
0b00000000111100000011110000000000,
|
||||
0b00000000011110000111110000000000,
|
||||
0b00000000001111001111100000000000,
|
||||
0b00000000001111001111000000000000,
|
||||
0b00000000000001001111000000000000,
|
||||
0b00000000000000001111000000000000,
|
||||
0b00000000000110001111000110000000,
|
||||
0b00000000001111001111001111000000,
|
||||
0b00000000001111101111011110000000,
|
||||
0b00000000000111111111111100000000,
|
||||
0b00000000000011111111111000000000,
|
||||
0b00000000000101111111110000000000,
|
||||
0b00000000000110111111100000000000,
|
||||
0b00000000000111011111000000000000,
|
||||
0b00000000000111001110000000000000,
|
||||
0b00000000000111000100000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
}));
|
||||
}
|
||||
|
||||
public boolean handle(Context context, StatusBarNotification sbn) {
|
||||
|
@ -32,7 +32,8 @@ public class NavigationInfoSpec {
|
||||
public static final int ACTION_ROUNDABOUT_RIGHT = 13;
|
||||
public static final int ACTION_ROUNDABOUT_LEFT = 14;
|
||||
public static final int ACTION_ROUNDABOUT_STRAIGHT = 15;
|
||||
public static final int ACTION_FINISH = 16;
|
||||
public static final int ACTION_ROUNDABOUT_UTURN = 16;
|
||||
public static final int ACTION_FINISH = 17;
|
||||
|
||||
// ETA? Total Distance?
|
||||
public String instruction;
|
||||
|
@ -1538,7 +1538,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
String[] navActions = {
|
||||
"","continue", "left", "left_sharp", "left_slight", "right", "right_slight",
|
||||
"right_sharp", "keep_left", "keep_right", "uturn_left", "uturn_right",
|
||||
"offroute", "roundabout_right", "roundabout_left", "roundabout_straight", "finish"};
|
||||
"offroute", "roundabout_right", "roundabout_left", "roundabout_straight", "roundabout_uturn", "finish"};
|
||||
if (navigationInfoSpec.nextAction>0 && navigationInfoSpec.nextAction<navActions.length)
|
||||
o.put("action", navActions[navigationInfoSpec.nextAction]);
|
||||
if (navigationInfoSpec.ETA!=null)
|
||||
|
Loading…
Reference in New Issue
Block a user