2020年5月4日月曜日

OSMANDをbluetoothリモコンで操る

yahooカーナビは専用リモコンがあって羨ましい。のでOSMANDでもやってみます。これができれば他のナビアプリでも大体なんとかなります。たぶん。
リモコンのオートパワーオフ対策もしなくては。

OSMAND,tasker,適当なbluetoothリモコン(gamepad)を使いました。上下左右の地図移動はそのまま使えたので、手を付けていません。
一番下の入力遮断は、今回使ったボタンが他の機能も兼ねていたようなので加えました。使いたいボタンが他の機能を持っていなければ必要ありません。
osmandは単純にzoom in, zoom outを発行しても駄目でした
リモコンのボタンが余ってるから、10秒限定音声メモボタンとかにしたいな(ツーリング中にふとやることを思いついては忘れて悔しいので)

ところでosmandはkmlもルートとして読めるようになったし(googleマイマップからの読み込みが少し楽になった)、あとはバードビューに対応してくれればなあ。
あとはどのナビアプリにも言えるけど、陸橋などの分岐(交差点認識されていない)で確実に案内してほしい…。

■ズームイン
   Profile: OSMANDズームイン (80)
    Restore: no
    Application: OsmAnd~
    Event: AutoInput Key [ Configuration:Keys: Button X
    Key Action: Key Down
    Manual Key Codes: 99, ]
    Enter: Anon (81)
    A1: Flash [ Text:ずーむいん Long:Off ]
    A2: AutoInput Action [ Configuration:Type: Id
    Value: net.osmand.plus:id/map_zoom_in_button
    Action : Click Timeout (Seconds):23 ]

■ズームアウト   
    Profile: OSMANDズームアウト (16)
    Restore: no
    Application: OsmAnd~
    Event: AutoInput Key [ Configuration:Keys: Button A
    Key Action: Key Down
    Manual Key Codes: 96, ]
    Enter: Anon (22)
    A1: Flash [ Text:ズームアウト Long:Off ]
    A2: AutoInput Action [ Configuration:Type: Id
    Value: net.osmand.plus:id/map_zoom_out_button
    Action : Click Timeout (Seconds):23 ]
   
■他のキーの入力を受け付けない
    Profile: OSMANDキー入力遮断 (55)
    Restore: no
    Application: OsmAnd~
    Enter: Anon (56)
    A1: AutoInput Modes [ Configuration:Key Suppress: Enable Timeout (Seconds):2 ]
    Exit: Anon (61)
    A1: AutoInput Modes [ Configuration:Key Suppress: Disable Timeout (Seconds):2 ]
   

0 件のコメント: