Skip to content

Commit b3e3760

Browse files
committed
New compact mode
Compact mode is enabled by interacting with the logo picture. Other changes: - Updated dependencies - Switched to f-strings wherever possible - Embedded new fonts - Code cleanup
1 parent a8a05ba commit b3e3760

11 files changed

Lines changed: 540 additions & 326 deletions

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Fonts used:
5858
- [ ] COM (Windows)
5959
- [ ] tty (*NIX OSes)
6060
- [x] On/Standby
61-
- [x] Volume control
61+
- [x] Main volume
6262
- [x] Get
6363
- [x] Relative
6464
- [ ] Absolute
@@ -79,6 +79,11 @@ Fonts used:
7979
- [x] Relative (-18dB, -24dB…)
8080
- [ ] Absolute
8181
- [ ] SPL calibrated
82+
- [ ] Zone 2
83+
- [ ] Per Channel level (Up to 7.1)
84+
- [ ] Tone
85+
- [ ] EQ
86+
- [ ] Sound presets
8287
- [ ] Input select
8388
- [x] Favorites
8489
- [ ] Security

denonremote/denon/communication.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class DenonProtocol(LineOnlyReceiver, TimeoutMixin):
2020
# From DN-500 manual (DN-500AVEM_ENG_CD-ROM_v00.pdf) page 91 (97 in PDF form)
2121
MAX_LENGTH = 135
22-
DELAY = 0.04
22+
DELAY = 0.2
2323
"""
2424
Delay between messages in seconds.
2525
The documentation requires 200 ms. 40 ms seems safe.
@@ -46,11 +46,11 @@ def sendLine(self, line):
4646
if b'?' in line:
4747
# A request is made. We need to delay the next calls
4848
self.ongoing_calls += 1
49-
logger.debug("Ongoing calls for delay: %s", self.ongoing_calls)
49+
logger.debug(f"Ongoing calls for delay: {self.ongoing_calls}")
5050
delay = 0 # Send now
5151
if self.ongoing_calls > 0:
5252
delay = self.DELAY * (self.ongoing_calls - 1) # Send after other messages
53-
logger.debug("Will send line: %s in %f seconds", line, delay)
53+
logger.debug(f"Will send line: {line} in {delay} seconds")
5454
return task.deferLater(reactor, delay=delay,
5555
callable=self.sendLineWithTimeout, line=line)
5656

@@ -66,10 +66,10 @@ def lineReceived(self, line):
6666
if self.ongoing_calls:
6767
# We received a reply
6868
self.ongoing_calls -= 1
69-
logger.debug("Ongoing calls for delay: %s", self.ongoing_calls)
69+
logger.debug(f"Ongoing calls for delay: {self.ongoing_calls}")
7070
receiver = DN500AVMessage()
7171
receiver.parse_response(line)
72-
logger.info("Received line: %s", receiver.response)
72+
logger.info(f"Received line: {receiver.response}")
7373

7474
# FIXME: parse message into state
7575

@@ -117,7 +117,7 @@ def get_volume(self):
117117
def set_volume(self, value):
118118
rawvalue = DN500AVFormat().mv_reverse_params.get(value)
119119
if rawvalue is None:
120-
logger.warning("Set volume value %s is invalid.", value)
120+
logger.warning(f"Set volume value {value} is invalid.")
121121
else:
122122
message = 'MV' + rawvalue
123123
self.sendLine(message.encode('ASCII'))

0 commit comments

Comments
 (0)