Skip to content

Commit 6761f4f

Browse files
committed
add model dependent installation mode lookup
1 parent 08d278a commit 6761f4f

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

cmdserver/jvccommands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class BinaryData:
3232
class Model(ReadOnly, Enum):
3333
"""Projector model code"""
3434
DLA_N7 = b'ILAFPJ -- B2A2'
35+
DLA_NZ700 = b'ILAFPJ -- D8A1'
3536

3637

3738
def s8_bytes_to_list(bstr):

cmdserver/pjcontroller.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from cmdserver.debounce import debounce
1313
from cmdserver.jvc import CommandExecutor, CommandNack
1414
from cmdserver.jvccommands import Command, load_all_commands, Numeric, PowerState, \
15-
READ_ONLY_RC
15+
READ_ONLY_RC, Model
1616
from cmdserver.mqtt import MQTT
1717
from jvccommands import InstallationMode
1818

@@ -77,13 +77,18 @@ def __update_state(self):
7777
ana = self.__executor.get(cmd)
7878
cmd = Command.PictureMode
7979
pic = self.__executor.get(cmd)
80-
# cmd = Command.InstallationMode
81-
# install = self.__executor.get(cmd)
80+
cmd = Command.Model
81+
md = self.__executor.get(cmd)
82+
if md != Model.DLA_NZ700:
83+
cmd = Command.InstallationMode
84+
install = self.__executor.get(cmd)
85+
else:
86+
install = InstallationMode.ONE.name
8287
self.__attributes = {
8388
'anamorphicMode': ana.name,
84-
# 'installationMode': install.name,
85-
'installationMode': InstallationMode.ONE.name,
86-
'pictureMode': pic.name
89+
'installationMode': install,
90+
'pictureMode': pic.name,
91+
'model': md.name,
8792
}
8893
update_in = 10
8994
else:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ezmote-cmdserver"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "A small webapp which can be used for web based home cinema automation"
55
authors = [
66
{ name = "3ll3d00d", email = "mattkhan+cmdserver@gmail.com" }

0 commit comments

Comments
 (0)