Who is here? 1 guest(s)
 Print Thread
TC4 - Coding and tech issues
Not without code changes.
That are possible without little additional resources consumption.
Could you tell me what code changes are required, and if they are straightforward, or more complicated? If they are simple maybe I could implement them. If not, maybe I'll just implement the Config_PAC2 which is given. I have a zero cross SSR which I am hoping to use to control the heating element, might have to get my hands on a random fire SSR if the code is not easy to change.
Not something to be sketched here in some lines...
CONFIG_PAC2 is using ICC for heater, not PAC.
ICC could be compatible with a ZC SSR, worth a try, depends how is the ZC implemented inside SSR, could not collide with the the other ZC detection, used by Arduino for PAC control.
Nothing will broke if testing, use a bulb instead heater and see if the light follows proportionally your control. The alternatives are flickering, of completely On/OFF, but no electronic damages risk.
As discussed here

I am adding the MIN_IO3 and MAX_IO3 checks into the IO3;xxx command as suggested.

Renatoa, you suggested using the line from the IO3_DOWN command

if( levelIO3 < MIN_IO3 & levelIO3 != 0 ) levelIO3 = 0; // turn IO3 off if trying to go below minimum.

But I'm thinking it should match the checks used in the OT1;xxx and OT2;xxx commands instead. See below in bold.

This means that IO3 can only be set to 0 if it is explicitly set to 0 using the IO3;0 command. Otherwise it will limit it to IO3_MIN.

    else {
      uint8_t len = strlen( pars->paramStr(1) );
      if( len > 0 ) {
        levelIO3 = atoi( pars->paramStr(1) );
        if( levelIO3 > MAX_IO3 ) levelIO3 = MAX_IO3; // don't allow IO3 to exceed maximum
        if( levelIO3 < MIN_IO3 & levelIO3 != 0 ) levelIO3 = MIN_IO3; // don't allow to set less than minimum unless setting to zero.

Strictly for the initial purpose in the thread linked by you, where the issue was exposed... freezing to MIN_IO3 when levelIO3 < MIN_IO3 but not zero, will not help our fellow slider request.
He needs fan cutoff when the slider is moved one position bellow MIN_IO3, only one step. If for his case MIN_IO3 is set to 50 and moving slider to 49 will keep fan at 50 is not what he wants.
So probably always some people will customize the code to their needs Grin
Jump to Forum: