Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Supported Sony projectors should include:
* VPL-VW520
* VPL-VW528
* VPL-VW665
* VPL-XW5000



Expand Down
16 changes: 15 additions & 1 deletion pysdcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,21 @@ def get_power(self):
return False
else:
return True


def set_calibration_preset(self, calibration_preset: str):
if calibration_preset not in CALIBRATION_PRESETS:
raise ValueError("Calibration preset not found")
else:
self._send_command(action=ACTIONS["SET"], command=COMMANDS["CALIBRATION_PRESET"],
data=CALIBRATION_PRESETS[calibration_preset])
return True

def get_calibration_preset(self):
data = self._send_command(action=ACTIONS["GET"], command=COMMANDS["CALIBRATION_PRESET"])
for key, value in CALIBRATION_PRESETS.items():
if value == data:
return key
return "UNKNOWN_CALIBRATION_PRESET_"+str(data)

if __name__ == '__main__':
# b = Projector()
Expand Down
12 changes: 12 additions & 0 deletions pysdcp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@
"COOLING": 4,
"COOLING2": 5
}

CALIBRATION_PRESETS = {
"CINEMA_FILM_1": 0x0000,
"CINEMA_FILM_2": 0x0001,
"REFERENCE": 0x0002,
"TV": 0x0003,
"PHOTO": 0x0004,
"GAME": 0x0005,
"BRIGHT_CINEMA": 0x0006,
"BRIGHT_TV": 0x0007,
"USER": 0x0008,
}