Skip to content

Commit

Permalink
[viera-connector-homekit-connector-bridge] Prepared viera connector t…
Browse files Browse the repository at this point in the history
…o homekit connector bridge (#306)
  • Loading branch information
actions-user committed Sep 29, 2024
1 parent d9f6f06 commit bd4bef2
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 229 deletions.
6 changes: 4 additions & 2 deletions src/Commands/Execute.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ protected function execute(Input\InputInterface $input, Output\OutputInterface $

$io = new Style\SymfonyStyle($input, $output);

$io->title((string) $this->translator->translate('//viera-connector.cmd.execute.title'));
if ($input->getOption('quiet') === false) {
$io->title((string) $this->translator->translate('//viera-connector.cmd.execute.title'));

$io->note((string) $this->translator->translate('//viera-connector.cmd.execute.subtitle'));
$io->note((string) $this->translator->translate('//viera-connector.cmd.execute.subtitle'));
}

if ($input->getOption('no-interaction') === false) {
$question = new Console\Question\ConfirmationQuestion(
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -988,9 +988,9 @@ private function createDevice(Style\SymfonyStyle $io, Entities\Connectors\Connec
array_merge(
[
[
'TV',
500,
500,
Viera\Constants::TV_IDENTIFIER,
Viera\Constants::TV_CODE,
Viera\Constants::TV_CODE,
],
],
$hdmi !== [] ? $hdmi : [],
Expand Down
8 changes: 8 additions & 0 deletions src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ class Constants
Types\ActionKey::MENU->value => Types\ChannelPropertyIdentifier::KEY_MENU,
];

public const TV_IDENTIFIER = 'TV';

public const TV_CODE = 500;

public const MAX_HDMI_CODE = 100;

public const MIN_APPLICATION_CODE = 1_000;

}
8 changes: 7 additions & 1 deletion src/DI/VieraExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,18 @@ public function loadConfiguration(): void
$builder->addFactoryDefinition($this->prefix('writers.event'))
->setImplement(Writers\EventFactory::class)
->getResultDefinition()
->setType(Writers\Event::class);
->setType(Writers\Event::class)
->setArguments([
'logger' => $logger,
]);

$builder->addFactoryDefinition($this->prefix('writers.exchange'))
->setImplement(Writers\ExchangeFactory::class)
->getResultDefinition()
->setType(Writers\Exchange::class)
->setArguments([
'logger' => $logger,
])
->addTag(ExchangeDI\ExchangeExtension::CONSUMER_STATE, false);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Devices/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Device extends DevicesEntities\Devices\Device

public const DEFAULT_PORT = 55_000;

public const STATE_READING_DELAY = 5_000.0;
public const STATE_READING_DELAY = 300.0;

public function __construct(
string $identifier,
Expand Down
6 changes: 3 additions & 3 deletions src/Queue/Consumers/StoreDevice.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ function () use ($message, $connector): Entities\Devices\Device {
array_merge(
[
[
'TV',
500,
500,
Viera\Constants::TV_IDENTIFIER,
Viera\Constants::TV_CODE,
Viera\Constants::TV_CODE,
],
],
array_map(
Expand Down
Loading

0 comments on commit bd4bef2

Please sign in to comment.