Number TO Hex

A forums to allow resolved bugs and problems with Flowcode v7 to be stored and marked as resolved.

Moderator: Benj

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Number TO Hex

Postby Alan_37 » Mon Aug 29, 2016 12:24 pm

Hi

Just found a small bug , when converting Number to hex string
for 1 to 9 in the simulation shows that hex string is 0x01 to 0x09
but than when you burn to the chip the string is 0x1 to 0x9 , it took me while
trying to find what is wrong cause i was comparing the
Hex string to another string , in simulation worked perfectly but on chip
dose not .

Chip is : Atmega2560 ( Arduino Mega2560 R3)

So hope you can fix it thanks .

Alan

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8544
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3528 times
Contact:

Re: Number TO Hex

Postby medelec35 » Mon Aug 29, 2016 1:09 pm

Hi Alan,While you are waiting for that to be sorted, have you see this?

Martin
These users thanked the author medelec35 for the post:
Alan_37 (Mon Sep 05, 2016 11:18 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Benj
Matrix Staff
Posts: 14584
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4607 times
Been thanked: 4242 times
Contact:

Re: Number TO Hex

Postby Benj » Tue Aug 30, 2016 12:41 pm

Hello,

Please can you try this updated CAL file and see if it solves the problem for you. It should now force the number to have at least two characters e.g. "0x01" instead of "0x1"

The file needs to be placed into the "Flowcode 7/CAL/AVR" directory before recompiling your project.

AVR_CAL_String.c
(24.39 KiB) Downloaded 147 times
These users thanked the author Benj for the post:
Alan_37 (Mon Sep 05, 2016 10:26 pm)
Rating: 5.26%
 

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Re: Number TO Hex

Postby Alan_37 » Mon Sep 05, 2016 10:26 pm

Hi Benj

Just saw the post to day ,
I have fixed the problem by cutting the 0x then check the string length if = 1 then hex_string = "0" + hex_string .

But i will certainly replace the cal file make some test and let you know .

Thanks very much .

Alan

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Re: Number TO Hex

Postby Alan_37 » Mon Sep 05, 2016 10:57 pm

Hi Benj

Just made the test, i think this needs some more attention see Attachment :| .
Attachments
before-After.png
before-After.png (26.51 KiB) Viewed 6541 times

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Re: Number TO Hex

Postby Alan_37 » Tue Sep 06, 2016 3:05 pm

Hi

I have overwritten the original file , can someone upload AVR_CAL_String.c please

Thanks in advance .

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8544
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3528 times
Contact:

Re: Number TO Hex

Postby medelec35 » Tue Sep 06, 2016 3:12 pm

Hopefully this will help.

Martin
Attachments
AVR_CAL_UART.c
(64.14 KiB) Downloaded 127 times
These users thanked the author medelec35 for the post:
Alan_37 (Tue Sep 06, 2016 3:30 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Re: Number TO Hex

Postby Alan_37 » Tue Sep 06, 2016 3:30 pm

Thanks medelec

But still no luck

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8544
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3528 times
Contact:

Re: Number TO Hex

Postby medelec35 » Thu Sep 08, 2016 8:16 am

Hi Alan,
i have posted the original file as requested.
Not modified it at all.

Martin
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
LeighM
Matrix Staff
Posts: 1962
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 475 times
Been thanked: 674 times
Contact:

Re: Number TO Hex

Postby LeighM » Thu Sep 08, 2016 8:43 am

Hi Alan,
Try this ..
Attachments
AVR_CAL_String.c
(24.46 KiB) Downloaded 112 times
These users thanked the author LeighM for the post:
Alan_37 (Fri Sep 09, 2016 10:45 am)
Rating: 5.26%
 

User avatar
Alan_37
Posts: 153
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 53 times
Been thanked: 53 times
Contact:

Re: Number TO Hex

Postby Alan_37 » Fri Sep 09, 2016 10:45 am

Hi Leigh

Yesss that Fixed it , please include this in the update .

Thanks very much .

Alan
Attachments
Fixed.png
Fixed.png (10.88 KiB) Viewed 6451 times

User avatar
LeighM
Matrix Staff
Posts: 1962
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 475 times
Been thanked: 674 times
Contact:

Re: Number TO Hex

Postby LeighM » Fri Sep 09, 2016 12:24 pm

Hi Alan,
Thanks for the confirmation, the file is now in our repo ready for next update/release.
Regards,
Leigh