Set sunrise and sunset times

Function table

__IDO_FUNCTABLE__.funcTable38Model.setWeatherSunTime

Description of Sunrise and sunset time model

  • IDOSetWeatherSunTimeModel
Parameter Description Remark
sunriseHour Surise Hour int
sunriseMinute Sunrise Minute int
sunsetHour Sunset Hour int
sunsetMinute Sunset Minute int

Command code

Objc:

IDOSetWeatherSunTimeModel * model = [IDOSetWeatherSunTimeModel currentModel];
[IDOFoundationCommand setWeatherSunTimeCommand:model
                                      callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOSetWeatherSunTimeModel.current();
IDOFoundationCommand.setWeatherSunTime(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""