Andre87osx / AstroPi-system

Gear for astrophotography experience
GNU General Public License v3.0
3 stars 0 forks source link

CoolerControl #184

Closed Andre87osx closed 1 month ago

Andre87osx commented 2 years ago

Base to add CoolerControntro in schedular. Need revison and dev plan in scheduler.ccp line 30 #include "ekos/capture/capture.h"

line 235 // Connect coolerControl connect(temperatureRegulationB, &QPushButton::clicked, this, &Ekos::Capture::showTemperatureRegulation); connect(cameraTemperatureS, &QCheckBox::toggled, [this](bool toggled) { if (currentCCD) { QVariantMap auxInfo = currentCCD->getDriverInfo()->getAuxInfo(); auxInfo[QString("%1_TC").arg(currentCCD->getDeviceName())] = toggled; currentCCD->getDriverInfo()->setAuxInfo(auxInfo); } }); connect(setTemperatureB, &QPushButton::clicked, [&]() { if (currentCCD) currentCCD->setTemperature(cameraTemperatureN->value()); }); connect(coolerOnB, &QPushButton::clicked, [&]() { if (currentCCD) currentCCD->setCoolerControl(true); }); connect(coolerOffB, &QPushButton::clicked, [&]() { if (currentCCD) currentCCD->setCoolerControl(false); }); connect(cameraTemperatureN, &QDoubleSpinBox::editingFinished, setTemperatureB, static_cast<void (QPushButton::*)()>(&QPushButton::setFocus));

in scheduler.ui line 354 `

0 0 Control CCD cooler. Main control are in CCD page CCD Cooler:
      </item>
      <item row="8" column="2">
       <layout class="QHBoxLayout" name="horizontalLayout_11">
        <property name="spacing">
         <number>2</number>
        </property>
        <item>
         <widget class="QPushButton" name="coolerOnB">
          <property name="enabled">
           <bool>false</bool>
          </property>
          <property name="minimumSize">
           <size>
            <width>32</width>
            <height>32</height>
           </size>
          </property>
          <property name="toolTip">
           <string>Turn cooler on</string>
          </property>
          <property name="styleSheet">
           <string notr="true">QPushButton:checked

{ background-color: maroon; border: 1px outset; font-weight:bold; }

On
          <property name="checkable">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item>
         <widget class="QPushButton" name="coolerOffB">
          <property name="enabled">
           <bool>false</bool>
          </property>
          <property name="minimumSize">
           <size>
            <width>32</width>
            <height>32</height>
           </size>
          </property>
          <property name="toolTip">
           <string>Turn cooler off</string>
          </property>
          <property name="styleSheet">
           <string notr="true">QPushButton:checked

{ background-color: maroon; border: 1px outset; font-weight:bold; }

Off
          <property name="checkable">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item>
         <widget class="QCheckBox" name="cameraTemperatureS">
          <property name="toolTip">
           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enforce temperature value before capturing an image&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="text">
           <string>Tº</string>
          </property>
          <property name="checked">
           <bool>false</bool>
          </property>
         </widget>
        </item>
       </layout>
      </item>
      <item row="8" column="2" colspan="2">
       <widget class="QLabel" name="temperatureOUT">
        <property name="minimumSize">
         <size>
          <width>0</width>
          <height>32</height>
         </size>
        </property>
        <property name="toolTip">
         <string>Current CCD temperature</string>
        </property>
        <property name="text">
         <string/>
        </property>
       </widget>
      </item>
      <item row="8" column="2">
       <widget class="QDoubleSpinBox" name="cameraTemperatureN">
        <property name="enabled">
         <bool>false</bool>
        </property>
        <property name="sizePolicy">
         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
          <width>0</width>
          <height>32</height>
         </size>
        </property>
        <property name="toolTip">
         <string>Desired CCD temperature</string>
        </property>
       </widget>
      </item>
      <item row="8" column="2">
       <widget class="QPushButton" name="setTemperatureB">
        <property name="enabled">
         <bool>false</bool>
        </property>
        <property name="minimumSize">
         <size>
          <width>24</width>
          <height>24</height>
         </size>
        </property>
        <property name="toolTip">
         <string>Set CCD temperature</string>
        </property>
        <property name="text">
         <string/>
        </property>
        <property name="icon">
         <iconset theme="checkmark">
          <normaloff>.</normaloff>.</iconset>
        </property>
        <property name="iconSize">
         <size>
          <width>24</width>
          <height>24</height>
         </size>
        </property>
       </widget>
      </item>`