board hang

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
User avatar
10der
Posts: 80
Joined: 08 Jul 2016 00:23
Location: Ukraine - Berkeley, CA

Re: board hang

Post by 10der »

ZUNO types drive me crazy.

sorry!
p0lyg0n1
Posts: 242
Joined: 04 Aug 2016 07:14

Re: board hang

Post by p0lyg0n1 »

The short reply is "because 8051 is 8bit microcontroller and the SDCC is old fashioned C-compiler". It converts types only "on demand" when you ask him. I wrote about it here https://forum.z-wave.me/viewtopic.php?f=3427&t=24150
some of the posible variants are:

Code: Select all

long x = secsUp;
x /= 60;
x /= 60;
x /= 24;
Or

Code: Select all

long x = secsUp;
x /= 84000L;
or

Code: Select all

long x = secsUp/long(60*60*24);
User avatar
10der
Posts: 80
Joined: 08 Jul 2016 00:23
Location: Ukraine - Berkeley, CA

Re: board hang

Post by 10der »

awesome!
thank you again.

Have a nice day!
Post Reply