Commit 29734919 authored by Andrey Filippov's avatar Andrey Filippov

Fixed DAEMON_EN bit (autoexposuer was not active)

parent 5e094fb3
...@@ -925,21 +925,22 @@ function init_cameras(){ // $page) { init can only be from default page as page ...@@ -925,21 +925,22 @@ function init_cameras(){ // $page) { init can only be from default page as page
foreach ( $GLOBALS['ports'] as $port ) { foreach ( $GLOBALS['ports'] as $port ) {
if (!isset($all_parLater[$port]['SENSOR_RUN'])) $all_parLater[$port]['SENSOR_RUN'] = 2; if (!isset($all_parLater[$port]['SENSOR_RUN'])) $all_parLater[$port]['SENSOR_RUN'] = 2;
if (!isset($all_parLater[$port]['COMPRESSOR_RUN'])) $all_parLater[$port]['COMPRESSOR_RUN'] = 2; if (!isset($all_parLater[$port]['COMPRESSOR_RUN'])) $all_parLater[$port]['COMPRESSOR_RUN'] = 2;
if (isset ($all_parLater[$port]['DAEMON_EN'] )) { // 'DAEMON_EN' has prfececdence over individual bits if (!isset($all_parLater[$port]['DAEMON_EN'])){ // set defaults here if none is set
$daemon_en=$all_parLater[$port]['DAEMON_EN']; $all_parLater[$port]['DAEMON_EN']= // set default values
$all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_AUTOEXPOSURE) & 1; ( 1 << ELPHEL_CONST_DAEMON_BIT_AUTOEXPOSURE) |
$all_parLater[$port]['DAEMON_EN_STREAMER'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_STREAMER) & 1; ( 1 << ELPHEL_CONST_DAEMON_BIT_STREAMER) |
$all_parLater[$port]['DAEMON_EN_CCAMFTP'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_CCAMFTP) & 1; ( 0 << ELPHEL_CONST_DAEMON_BIT_CCAMFTP) |
$all_parLater[$port]['DAEMON_EN_CAMOGM'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_CAMOGM) & 1; ( 0 << ELPHEL_CONST_DAEMON_BIT_CAMOGM) |
$all_parLater[$port]['DAEMON_EN_AUTOCAMPARS'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_AUTOCAMPARS) & 1; ( 0 << ELPHEL_CONST_DAEMON_BIT_AUTOCAMPARS) |
$all_parLater[$port]['DAEMON_EN_TEMPERATURE'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_TEMPERATURE) & 1; ( 0 << ELPHEL_CONST_DAEMON_BIT_TEMPERATURE);
} }
if (!isset($all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'])) $all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'] = 1; $daemon_en=$all_parLater[$port]['DAEMON_EN'];
if (!isset($all_parLater[$port]['DAEMON_EN_STREAMER'])) $all_parLater[$port]['DAEMON_EN_STREAMER'] = 1; if (!isset ($all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'])) $all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_AUTOEXPOSURE) & 1;
if (!isset($all_parLater[$port]['DAEMON_EN_CCAMFTP'])) $all_parLater[$port]['DAEMON_EN_CCAMFTP'] = 0; if (!isset ($all_parLater[$port]['DAEMON_EN_STREAMER'])) $all_parLater[$port]['DAEMON_EN_STREAMER'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_STREAMER) & 1;
if (!isset($all_parLater[$port]['DAEMON_EN_CAMOGM'])) $all_parLater[$port]['DAEMON_EN_CAMOGM'] = 0; if (!isset ($all_parLater[$port]['DAEMON_EN_CCAMFTP'])) $all_parLater[$port]['DAEMON_EN_CCAMFTP'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_CCAMFTP) & 1;
if (!isset($all_parLater[$port]['DAEMON_EN_AUTOCAMPARS'])) $all_parLater[$port]['DAEMON_EN_AUTOCAMPARS'] = 0; if (!isset ($all_parLater[$port]['DAEMON_EN_CAMOGM'])) $all_parLater[$port]['DAEMON_EN_CAMOGM'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_CAMOGM) & 1;
if (!isset($all_parLater[$port]['DAEMON_EN_TEMPERATURE'])) $all_parLater[$port]['DAEMON_EN_TEMPERATURE'] = 0; if (!isset ($all_parLater[$port]['DAEMON_EN_AUTOCAMPARS'])) $all_parLater[$port]['DAEMON_EN_AUTOCAMPARS'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_AUTOCAMPARS) & 1;
if (!isset ($all_parLater[$port]['DAEMON_EN_TEMPERATURE'])) $all_parLater[$port]['DAEMON_EN_TEMPERATURE'] = ($daemon_en >> ELPHEL_CONST_DAEMON_BIT_TEMPERATURE) & 1;
$all_parLater[$port]['DAEMON_EN']= $all_parLater[$port]['DAEMON_EN']=
(($all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'] & 1) << ELPHEL_CONST_DAEMON_BIT_AUTOEXPOSURE) | (($all_parLater[$port]['DAEMON_EN_AUTOEXPOSURE'] & 1) << ELPHEL_CONST_DAEMON_BIT_AUTOEXPOSURE) |
(($all_parLater[$port]['DAEMON_EN_STREAMER'] & 1) << ELPHEL_CONST_DAEMON_BIT_STREAMER) | (($all_parLater[$port]['DAEMON_EN_STREAMER'] & 1) << ELPHEL_CONST_DAEMON_BIT_STREAMER) |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment