本文整理汇总了C++中Program::endMinutes方法的典型用法代码示例。如果您正苦于以下问题:C++ Program::endMinutes方法的具体用法?C++ Program::endMinutes怎么用?C++ Program::endMinutes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Program
的用法示例。
在下文中一共展示了Program::endMinutes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool AFramework::MTempMaster::programsManager(const bool read){ //da fare
ADateTime currentClk;
Program prg;
AString str;
if(!m_flag){
return false;
}
if(read){
for(uint8 i = 0; i < _MTEMP_ROOM_VEC_SIZE; i++){
if(m_rooms[i].currentTemperature() != 0){ //se il sensore è vivo
str.clear();
str = m_rooms[i].sensorAddress();
m_rooms[i].setTemperature(readTemp(str, 1000)); //aggiorno la temperatura
}
}
}
if(m_clk->isGood()){
currentClk = m_clk->currentTime();
for(uint8 i=0; i < _MTEMP_ROOM_VEC_SIZE; i++){
prg = m_rooms[i].program(currentClk.Weekday());
if(m_rooms[i].isAuto()){
if(prg.isEnabled()){
if( ((prg.startHours() == currentClk.hours() && prg.startMinutes() <= currentClk.minutes())
||
(prg.startHours() < currentClk.hours()))
&&
((prg.endHours() == currentClk.hours() && prg.endMinutes() >= currentClk.minutes())
||
(prg.endHours() > currentClk.hours()))) {
if(m_rooms[i].currentTemperature() <= prg.targetTemperature()){
m_rooms[i].on();
}else{
m_rooms[i].off();
}
}else{
m_rooms[i].off();
}
}else{
m_rooms[i].off();
}
}
if(m_rooms[i].isForcedOff()){ //se lo spegnimento è forzato
m_rooms[i].off(); //metto off la porta
}
if(m_rooms[i].isForcedOn()){
m_rooms[i].on(); //metto on la porta
}
}
}else{
m_lcd->clear();
m_lcd->write("Errore ora");
System::delay(1000);
}
return false;
}