Removed all unusable TV Characteristics from TV and Input Source Services
But retained the actual Characteristics in the Characteristics lists in the event that they may be activated in the Home App in the future.
This commit is contained in:
parent
4eb1ebf806
commit
37e0486cf7
|
|
@ -92,7 +92,6 @@ struct TV_Source : Service::InputSource{
|
||||||
SpanCharacteristic *configName = new Characteristic::ConfiguredName("HDMI 12",true);
|
SpanCharacteristic *configName = new Characteristic::ConfiguredName("HDMI 12",true);
|
||||||
|
|
||||||
TV_Source() : Service::InputSource(){
|
TV_Source() : Service::InputSource(){
|
||||||
// new Characteristic::ConfiguredName("HDMI 12");
|
|
||||||
new Characteristic::Identifier(12);
|
new Characteristic::Identifier(12);
|
||||||
new Characteristic::IsConfigured(1);
|
new Characteristic::IsConfigured(1);
|
||||||
}
|
}
|
||||||
|
|
@ -136,74 +135,57 @@ void setup() {
|
||||||
new Service::HAPProtocolInformation();
|
new Service::HAPProtocolInformation();
|
||||||
new Characteristic::Version("1.1.0");
|
new Characteristic::Version("1.1.0");
|
||||||
|
|
||||||
SpanService *hdmi1 = new Service::InputSource();
|
SpanService *hdmi1 = new Service::InputSource(); // Source included in Selection List, but excluded from Settings Screen
|
||||||
new Characteristic::ConfiguredName("HDMI 1");
|
new Characteristic::ConfiguredName("HDMI 1");
|
||||||
new Characteristic::Identifier(1);
|
new Characteristic::Identifier(1);
|
||||||
|
|
||||||
SpanService *hdmi2 = new Service::InputSource();
|
SpanService *hdmi2 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 2");
|
new Characteristic::ConfiguredName("HDMI 2");
|
||||||
new Characteristic::Identifier(2);
|
new Characteristic::Identifier(2);
|
||||||
new Characteristic::IsConfigured(0);
|
new Characteristic::IsConfigured(0); // Source excluded from both the Selection List and the Settings Screen
|
||||||
|
|
||||||
SpanService *hdmi3 = new Service::InputSource();
|
SpanService *hdmi3 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 3");
|
new Characteristic::ConfiguredName("HDMI 3");
|
||||||
new Characteristic::Identifier(3);
|
new Characteristic::Identifier(3);
|
||||||
new Characteristic::IsConfigured(1);
|
new Characteristic::IsConfigured(1); // Source included in both the Selection List and the Settings Screen
|
||||||
|
|
||||||
SpanService *hdmi4 = new Service::InputSource();
|
SpanService *hdmi4 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 4");
|
new Characteristic::ConfiguredName("HDMI 4");
|
||||||
new Characteristic::Identifier(4);
|
new Characteristic::Identifier(4);
|
||||||
new Characteristic::IsConfigured(1);
|
new Characteristic::IsConfigured(1); // Source included in the Settings Screen...
|
||||||
new Characteristic::TargetVisibilityState(0);
|
new Characteristic::CurrentVisibilityState(1); // ...but excluded from the Selection List
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
|
||||||
|
|
||||||
SpanService *hdmi5 = new Service::InputSource();
|
SpanService *hdmi5 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 5");
|
new Characteristic::ConfiguredName("HDMI 5");
|
||||||
new Characteristic::Identifier(5);
|
new Characteristic::Identifier(5);
|
||||||
new Characteristic::IsConfigured(1);
|
new Characteristic::IsConfigured(1); // Source included in the Settings Screen...
|
||||||
new Characteristic::TargetVisibilityState(1);
|
new Characteristic::CurrentVisibilityState(0); // ...and included in the Selection List
|
||||||
new Characteristic::CurrentVisibilityState(1);
|
|
||||||
|
|
||||||
SpanService *hdmi6 = new Service::InputSource();
|
SpanService *hdmi6 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 6");
|
new Characteristic::ConfiguredName("HDMI 6");
|
||||||
new Characteristic::Identifier(6);
|
new Characteristic::Identifier(6);
|
||||||
new Characteristic::IsConfigured(0);
|
new Characteristic::IsConfigured(0); // Source excluded from both the Selection List and the Settings Screen
|
||||||
new Characteristic::TargetVisibilityState(0);
|
new Characteristic::CurrentVisibilityState(0); // If IsConfigured(0) is specified, CurrentVisibilityState() has no effect
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
|
||||||
|
|
||||||
SpanService *hdmi7 = new Service::InputSource();
|
SpanService *hdmi7 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 7");
|
new Characteristic::ConfiguredName("HDMI 7");
|
||||||
new Characteristic::Identifier(0);
|
new Characteristic::Identifier(7);
|
||||||
new Characteristic::IsConfigured(1);
|
new Characteristic::IsConfigured(1); // Source included in the Settings Screen...
|
||||||
new Characteristic::TargetVisibilityState(0);
|
new Characteristic::CurrentVisibilityState(0); // ...and included in the Selection List...
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
new Characteristic::TargetVisibilityState(0); // ...and a "checked" checkbox is provided on the Settings Screen that can be used to toggle CurrentVisibilityState()
|
||||||
|
|
||||||
SpanService *hdmi8 = new Service::InputSource();
|
SpanService *hdmi8 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 8");
|
new Characteristic::ConfiguredName("HDMI 8");
|
||||||
new Characteristic::Identifier(8);
|
new Characteristic::Identifier(8);
|
||||||
new Characteristic::TargetVisibilityState(0);
|
new Characteristic::IsConfigured(1); // Source included in the Settings Screen...
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
new Characteristic::CurrentVisibilityState(1); // ...but excluded from the Selection List...
|
||||||
|
new Characteristic::TargetVisibilityState(1); // ...and an "un-checked" checkbox is provided on the Settings Screen that can be used to toggle CurrentVisibilityState()
|
||||||
|
|
||||||
SpanService *hdmi9 = new Service::InputSource();
|
SpanService *hdmi9 = new Service::InputSource();
|
||||||
new Characteristic::ConfiguredName("HDMI 9");
|
new Characteristic::ConfiguredName("HDMI 9");
|
||||||
new Characteristic::Identifier(9);
|
new Characteristic::IsConfigured(1); // Source included in the Settings Screen...
|
||||||
new Characteristic::TargetVisibilityState(1);
|
new Characteristic::CurrentVisibilityState(0); // ...but without an Identifier() set, the Source is excluded from the Selection List regardless of CurrentVisibilityState(0)
|
||||||
new Characteristic::CurrentVisibilityState(1);
|
|
||||||
|
|
||||||
SpanService *hdmi10 = new Service::InputSource();
|
|
||||||
new Characteristic::ConfiguredName("HDMI 10");
|
|
||||||
new Characteristic::IsConfigured(1);
|
|
||||||
new Characteristic::TargetVisibilityState(0);
|
new Characteristic::TargetVisibilityState(0);
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
|
||||||
|
|
||||||
SpanService *hdmi11 = new Service::InputSource();
|
|
||||||
new Characteristic::ConfiguredName("HDMI 11");
|
|
||||||
new Characteristic::Identifier(11);
|
|
||||||
new Characteristic::IsConfigured(1);
|
|
||||||
new Characteristic::TargetVisibilityState(0);
|
|
||||||
new Characteristic::CurrentVisibilityState(0);
|
|
||||||
|
|
||||||
SpanService *hdmi12 = new TV_Source();
|
|
||||||
|
|
||||||
(new Service::Television())
|
(new Service::Television())
|
||||||
->addLink(hdmi1)
|
->addLink(hdmi1)
|
||||||
|
|
@ -215,14 +197,12 @@ void setup() {
|
||||||
->addLink(hdmi7)
|
->addLink(hdmi7)
|
||||||
->addLink(hdmi8)
|
->addLink(hdmi8)
|
||||||
->addLink(hdmi9)
|
->addLink(hdmi9)
|
||||||
->addLink(hdmi10)
|
|
||||||
->addLink(hdmi11)
|
|
||||||
->addLink(hdmi12)
|
|
||||||
;
|
;
|
||||||
new Characteristic::Active(1);
|
new Characteristic::Active(0); // TV On/Off (set to Off at start-up)
|
||||||
new Characteristic::ConfiguredName("AdvancedTV");
|
new Characteristic::ConfiguredName("Test TV"); // Name of TV
|
||||||
new Characteristic::ActiveIdentifier(3);
|
new Characteristic::ActiveIdentifier(3); // Sets HDMI 3 on start-up
|
||||||
new Characteristic::RemoteKey();
|
new Characteristic::RemoteKey(); // Used to receive button presses from the Remote Control widget
|
||||||
|
new Characteristic::PowerModeSelection(); // Adds "" option to Selection Screen
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
15
src/Span.h
15
src/Span.h
|
|
@ -201,12 +201,9 @@ namespace Service {
|
||||||
|
|
||||||
struct InputSource : SpanService { InputSource() : SpanService{"D9","InputSource"}{
|
struct InputSource : SpanService { InputSource() : SpanService{"D9","InputSource"}{
|
||||||
OPT(ConfiguredName);
|
OPT(ConfiguredName);
|
||||||
OPT(InputSourceType);
|
OPT(IsConfigured);
|
||||||
REQ(IsConfigured);
|
|
||||||
REQ(CurrentVisibilityState);
|
|
||||||
OPT(Name);
|
|
||||||
OPT(Identifier);
|
OPT(Identifier);
|
||||||
OPT(InputDeviceType);
|
OPT(CurrentVisibilityState);
|
||||||
OPT(TargetVisibilityState);
|
OPT(TargetVisibilityState);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
@ -336,14 +333,6 @@ namespace Service {
|
||||||
OPT(ActiveIdentifier);
|
OPT(ActiveIdentifier);
|
||||||
OPT(RemoteKey);
|
OPT(RemoteKey);
|
||||||
OPT(PowerModeSelection);
|
OPT(PowerModeSelection);
|
||||||
|
|
||||||
OPT(SleepDiscoveryMode);
|
|
||||||
OPT(Brightness);
|
|
||||||
OPT(ClosedCaptions);
|
|
||||||
OPT(CurrentMediaState);
|
|
||||||
OPT(TargetMediaState);
|
|
||||||
OPT(Name);
|
|
||||||
OPT(PictureMode);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
struct TemperatureSensor : SpanService { TemperatureSensor() : SpanService{"8A","TemperatureSensor"}{
|
struct TemperatureSensor : SpanService { TemperatureSensor() : SpanService{"8A","TemperatureSensor"}{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue