VTFT strange code generated

General discussion on Visual TFT Software.
Post Reply
Author
Message
dibor
Posts: 208
Joined: 29 Dec 2014 18:59

VTFT strange code generated

#1 Post by dibor » 07 Feb 2019 21:00

Have made VTFT FT812 project from MiroC for ARM
Have find strange FT812_PWM_FadeOut arguments:
FT812_PWM_FadeOut(pwmDuty, 0, pwmDuty/32? pwmDuty/32 : 1, 1);

Compiler do not show any error.

What this "pwmDuty/32? pwmDuty/32 : 1" argument means ?


Regards.

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: VTFT strange code generated

#2 Post by jovana.medakovic » 12 Feb 2019 10:06

Hello,

This is a declaration of function:
int8_ft8 FT812_PWM_FadeOut(uint8_ft8 from, uint8_ft8 to, uint8_ft8 step, uint16_ft8 delay);

The third parameter is:
uint8_ft8 step;

This statement can also be written in this way:

if(pwmDuty/32)
{
step = pwmDuty/32;
}
else
{
step = 1;
}

Kind regards,
Jovana

dibor
Posts: 208
Joined: 29 Dec 2014 18:59

Re: VTFT strange code generated

#3 Post by dibor » 12 Feb 2019 16:51

Understood. :)
Thank you!

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: VTFT strange code generated

#4 Post by jovana.medakovic » 12 Feb 2019 17:51

You're welcome!

Kind regards,
Jovana

Post Reply

Return to “Visual TFT General”