Skip to content

Commit

Permalink
Merge branch 'feature/0x45_0x46' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
piersholt committed Sep 7, 2022
2 parents 3bddee9 + 16000e1 commit 0b43606
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 80 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ Command|Description
`0x40`|[OBC Input](gt/40.md)
`0x41`|[OBC Control](gt/41.md)
`0x42`|[OBC Remote Control](ike/42.md)
`0x45`|[Radio UI Request](gt/45.md)
`0x46`|Radio UI
`0x45`|[Set Radio UI](gt/45.md)
`0x46`|[Request Radio UI](radio/46.md)
`0x47`|[BMBT "Soft" Buttons](bmbt/47.md)
`0x48`|[BMBT Buttons](bmbt/48.md)
`0x49`|[BMBT Navigation Dial](bmbt/49.md)
Expand Down
10 changes: 5 additions & 5 deletions gt/45.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ It's ostensibly the GT equivalent of `0x20`.

### Related

- `0x46` Request Radio UI
- `0x46` [Request Radio UI](../radio/46.md)

### Examples

# C23 BM
3B 04 68 45 00 12
3B 04 68 45 02 10 # 0b0000_0010
3B 04 68 45 03 11 # 0b0000_0011
3B 04 68 45 02 10
3B 04 68 45 03 11

# BM53
3B 04 68 45 0A 18 # 0b0000_1010
3B 04 68 45 0E 1C # 0b0000_1110
3B 04 68 45 0A 18
3B 04 68 45 0E 1C

## Parameters

Expand Down
180 changes: 107 additions & 73 deletions radio/46.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,14 @@
- regardless of MENU or OVERLAY. The radio will still write to display...
- it's not affected by which display GT is on, it will still write
- i guess the primary role of overlay is perhaps to show radio

BM53

- when hitting menu i get 0x46 twice with same value 0x01
- when hitting overlay i get 0x46 twice with split masks 0x02 and 0x0c

- however, turning radio off sends 0x46 ONCE... it's only for hide header 0x02

- AHHHHHH!
- it's the extra flags on 0x45 that determine whether radio sends 0x46 twice

- 45 01 => 46 TWICE
- 45 11 => 46 twice
- 45 81 => 46 twice

- 45 00 => 46 ONCE
- 45 10 => 46 ONCE
- 45 80 => 46 ONCE

- 45 02 => 46 once
- 45 0c => 46 once

- when bringing up TONE
- when radio rides.. it uses HIDE MENU 0b0000_1100 .. not 1 bit mask 0b0000_1000
- it's the same for soft SELECT
- HOWEVER, 0b0000_1000 still works if i generate a menu, then 46 08


- **does radio _ever_ send 0x00? can radio request relegating itself?**
- no, sending 0x46 0x00 doesn't bring radio up

- **Question: does GT send 0x45 to radio to hide menu when radio is off???**
- NO- GT must know radio is off (if radio has written a title, it sends it)

**When the radio turns on, it will assume it has control of the display- I guess the user intent is inherent when turing the radio on.**

- BM53 remembers if overlay is up or not- that's what determines if it is foreground at power on

# `0x46` Request Radio UI

Radio `0x68` → GT `0x3b`

The radio has limited control of the display in order to manage it's own interface. With respect to control of the display, the radio is ultimately subserveant to the GT and it's UI state will always be overridden by `0x45`.
The radio has limited control of the display in order to manage it's own interface.

However, the radio is ultimately subserveant to the GT and it's UI state will always be overridden by `0x45`.

### Related

- `0x37` [Radio Tone/Select](37.md)
- `0x45` [Set Radio UI](../gt/45.md)

### Examples
Expand All @@ -73,43 +35,106 @@ Fixed length. One byte bitfield.

When set to `1`, the radio is relinquishing the display.

When set to `0`, the radio is managing it's own display functions (outlined below).
When set to `0`, the radio is managing it's own display functions (outlined in Use Cases).

The radio `0x68` won't explictly set `0`- when the radio is turned on, the radio `0x68` will begin writing to the display, at which point, the GT `0x3b` is inherently aware of the radio `0x6b` being in the foreground.
Note: the radio won't ever set `0` of it's own accord. When the radio is turned on, it will just assume control of the display and begin writing to it, at which point the GT is inherently aware of the radio being in the foreground.

### Hide Header `0b0000_0010`

HIDE_HEADER = 0b0000_0010
HIDE_HEADER = 0b0000_0010

### Hide Body `0b0000_1100`

HIDE_BODY_SELECT = 0b0000_0100
HIDE_BODY_TONE = 0b0000_1000
HIDE_BODY_MENU = 0b0000_1100
HIDE_BODY_SELECT = 0b0000_0100
HIDE_BODY_TONE = 0b0000_1000
HIDE_BODY_MENU = 0b0000_1100

## Use Cases

### Hide Tone

#### C23 BM

![Hide Tone C23 BM](46/c23_tone.jpg)

F0 04 68 48 04 D0 # TONE button: Press
F0 04 68 48 84 50 # TONE button: Release
68 07 3B 37 80 00 00 10 F3 # Show Tone (and set parameters)
# Timeout...
68 04 3B 46 08 19 # Hide Tone

#### BM53

![Hide Tone BM53](37/neutral.jpg)

F0 04 68 48 04 D0 # TONE button: Press
F0 04 68 48 84 50 # TONE button: Release
68 07 3B 37 90 10 01 01 E3 # Show Tone (and set parameters)
# Timeout...
68 04 3B 46 08 19 # Hide Tone
68 04 3B 46 0C 1D # Hide Menu

### Hide Select

#### C23 BM

![Hide Select C23 BM](46/c23_select_cdc.jpg)

F0 04 68 48 20 F4 # SELECT button: Press
F0 04 68 48 A0 74 # SELECT button: Release
68 04 3B 37 40 20 # Show Select
# Timeout...
68 04 3B 46 04 15 # Hide Select

#### BM53

![Hide Select BM53](37/c23_cdc.jpg)

F0 05 FF 47 00 0F 42 # SELECT button: Press
68 04 3B 37 04 64 # Show Select
F0 05 FF 47 00 8F C2 # SELECT button: Release
# Timeout...
68 04 3B 46 04 15 # Hide Select
68 04 3B 46 0C 1D # Hide Menu

### Main Menu

A MENU press does not get sent to radio, but is broadcast, and instead handled by the GT `0x3b`, which will in turn, message the Radio `0x68`, requesting it relegate itself to the background.
A MENU press does not get sent to radio, but is broadcast, and instead handled by the GT `0x3b`, which will in turn, message the radio `0x68`, requesting it relegate itself to the background.

If the radio is on, but in the background, it will still write to the display for certain events (e.g. changing radio station, CD track etc), but will automatically return to the background after an ~8 second timeout.

GT will only send `0x45` if radio is on.

#### C23 BM

F0 04 FF 48 34 77 # MENU button: press
3B 04 68 45 01 13 # GT (legacy) requesting radio relinquish display
68 04 3B 46 01 10 # Radio relinquishing display

# Note the additional 0x45 bit set if Audio OBC enabled:
F0 04 FF 48 34 77
3B 04 68 45 03 11
68 04 3B 46 01 10

#### BM53

Similar to the C23 BM, however with one quirk- the BM53 sends `0x46` twice. (I suspect this is something to do with the updated UI.)

F0 04 FF 48 34 77 # MENU button press
3B 04 68 45 91 83 # GT (4-1/00) requesting radio relinquish foreground
68 04 3B 46 01 10 # Radio relinquishing foreground
68 04 3B 46 01 10 # Note: BM53 sends this command TWICE

### Hide Overlay/Radio Off
### Hide Overlay

When pressing the OVERLAY button, the radio relinquishes the display. The radio will still write titles, but automatically hide overlay again after 8 seconds

#### BM C23
When pressing the OVERLAY button, the radio relinquishes the display. The radio will still write titles, but automatically hide overlay again after ~8 seconds

Unlike a MENU button press, the OVERLAY button press is sent directly to the radio.

# BMBT Overlay button press
F0 04 68 48 30 E4

# Radio exits overlay mode:
68 04 3B 46 0E 1F # 0b0000_1110
#### BM C23

F0 04 68 48 30 E4 # BMBT Overlay button press
68 04 3B 46 0E 1F # Radio exits overlay mode

The radio will still write titles, but relinquish the display again after the timeout:

Expand All @@ -123,31 +148,40 @@ The radio will still write titles, but relinquish the display again after the ti

#### BM53

Similar to C23 BM, but `0x46` is sent twice.

# BMBT Overlay button press
F0 04 68 48 30 E4

# Radio exits overlay mode
68 04 3B 46 02 13 # 0b0000_0010
68 04 3B 46 0C 1D # 0b0000_1100
# Radio hides overlay
68 04 3B 46 02 13
68 04 3B 46 0C 1D

Radio writes titles while in background.
The BM53 will still write titles, but relinquish the display after a timeout.

# "☐ 89.3☐ "
68 .. 3b 23 62 10 "☐ 89.3☐ " ..
# "☐ 90.7☐ "
68 12 3B 23 62 10 03 20 39 30 2E 37 04 20 20 20 20 20 20 27

# 8 seconds pass
# 8 seconds pass...

# Radio hides overlay
68 04 3B 46 02 13
68 04 3B 46 0C 1D

### Hide Select

The radio doesn't have to redraw the menu, it's cached in the GT.
### Radio Off

![Hide Select](37/c23_cdc.jpg)
#### C23 BM

### Hide Tone
F0 04 68 48 06 D2 # POWER button: Press
68 04 F0 4A 00 D6 # BMBT radio LED: Off
68 04 3B 46 0E 1F # Hide Menu, Hide Header
F0 04 68 4B 05 D2 # Tape: none
F0 04 68 48 86 52 # POWER button: Release

The radio doesn't have to redraw the menu, it's cached in the GT.

![Hide Tone](37/neutral.jpg)
#### BM53

F0 04 68 48 06 D2 # POWER button: press
68 04 F0 4A 00 D6 # BMBT radio LED: off
68 04 3B 46 0E 1F # Hide Menu, Hide Header
F0 04 68 4B 05 D2 # Tape: none
F0 04 68 48 86 52 # POWER button: Release
Binary file added radio/46/c23_select_cdc.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added radio/46/c23_select_radio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added radio/46/c23_tone.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b43606

Please sign in to comment.