PB, request for code review and merge back(2)

More
06 Nov 2012 13:01 - 06 Nov 2012 13:04 #2726 by domcars0
Replied by domcars0 on topic PB, request for code review and merge back(2)
Hello,

PhracturedBlue wrote: As I said. I've used it. It really doesn't feel that weird to me.

I agree with PB ....

Thanks for your unbelievable work!

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 06 Nov 2012 13:04 by domcars0.

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 15:12 - 06 Nov 2012 15:13 #2732 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
suvsuv,
Do you really prefer having all the spinboxes work backwards just so that the keyboard works the way you like it?
With your current code, the spinboxes all feel backwards. I am not sure why you are so concerned with the keyboard. It is very rarely used in the grand scheme of things.

If you are really so adamant, put it back the way it was, and I'll give you a build-time option so you can have the keyboard work your way. If enough people complain, I'll make it the default. Certainly I would need to make it configurable from the target/ dir so that the emulator and devo8 behave as they do today.

I know I said you could reverse the buttons, but now that I've tried it, I realize I was wrong about that. With the buttons reversed it will cause a lot of confusion. For instance, setting up virtual channels using the arrow buttons makes no sense. if a button is labeled 'L' on the Tx, it should be labeled 'L' in the GUI as well.
Last edit: 06 Nov 2012 15:13 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 15:16 #2733 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Also, please move the telemetry config to the model page. the configuration of telemetry really is a per-model thing.

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 16:18 - 06 Nov 2012 16:19 #2734 by suvsuv
PB, the keyboard is just a minor issue and I can change it as you want.
Currently I have another critical issue wanting your help.
I spent a whole day to port the telemetry config and telemetry test(telemetry monitor) pages. The telemetry config page is all done and test wiel with real devo10. However, after I flashed dfu with telemtest page into devo10, its LCD got screwed up and the firmware just doesn't boot.

Now I figure out the something is wrong inside the PAGE_TelemtestEvent(). If I have codes in this function commented out, everything is just fine, otherwise, the devo10 won't boot.
I have checkin codes into my repo. Please check them out (of coz don't merge to your repo now) and see if there are hardware conflicts between current telemetry settings and devo10. Thanks
Last edit: 06 Nov 2012 16:19 by suvsuv.

Please Log in or Create an account to join the conversation.

More
06 Nov 2012 16:41 #2736 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
I'll check as soon as I can, but won't be back at my Tx for another 8 hours or so.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 06:58 #2741 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Sorry, I didn't get to this tonight. looking at the code though, it seems that you are running GUI_Redraw() on objects that aren't necessarily on screen, and that is likely to cause issues.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 12:43 - 07 Nov 2012 12:54 #2745 by suvsuv

PhracturedBlue wrote: Sorry, I didn't get to this tonight. looking at the code though, it seems that you are running GUI_Redraw() on objects that aren't necessarily on screen, and that is likely to cause issues.

I check all GUI_Redraw usages, the only place that might have problem is GUI_Redraw(listbox->scrollbar) in the GUI_DrawListbox method, however, this line won't be hit until entering the Load model or reorderlist pages. But the current issue is the devo10 cannot even boot.

I reproduced this issue in another way, if you checkout rev. 898 from my repo and build a dfu, the devo can't boot. Then you can try rev.898, commented out few updates related to the Telemetry stuffs--ported from devo8's main_page, it just works
Last edit: 07 Nov 2012 12:54 by suvsuv.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 13:59 - 07 Nov 2012 15:02 #2749 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
both 898 and 899 work for me. We are starting to get low on memory though (Deviation uses a lot of stack space). It might be a good idea to try doing a:
make clean TARGET=devo10
make TYPE=prd TARGET=devo10

That will do an optimized build, and if it works it would be useful info.
Also, please provide the dfu and list file for a build that is not working so I can compare (difference in compile version could be what is causing the discrepency)
Last edit: 07 Nov 2012 15:02 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 15:03 #2751 by suvsuv

PhracturedBlue wrote: both 898 and 899 work for me. We are starting to get low on memory though (Deviation uses a lot of stack space). It might be a good idea to try doing a:
make clean TARGET=devo10
make prd TARGET=devo10

That will do an optimized build, and if it works it would be useful info.
Also, please provide the dfu and list file for a build that is not working so I can compare (difference in compile version could be what is causing the discrepency)

You are right (but your previous command make prd is incorrect B) 。 The optimized build works, so we are in short of ROM

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 15:07 #2753 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
We aren't short of ROM. the build process will not over-allocate ROM. It may over-allocate RAM though. There are other options (like a stack-corruption bug) that will not show up with different compile switches.

I am building a script that will calculate stack usage, which should help give a better idea of where we stand.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 15:09 - 07 Nov 2012 15:11 #2754 by suvsuv
So 2 more questions :
1) Initially, I also suspected that the build might reach the limitation of ROM, however, the MCU's sheet mentions it has 256KB ROM and 48K RAM , but the debug build's size is only about 240KB and 22KB RAM. Where are the missing ROM?



2) Eventually the release build should be optimized , hence the release build 's size is only about 140KB, do we need to remove some redundant codes(all my traditional mixer files have been cut 2 days ago)?

Anyway, thanks for your help, the telemetry pages should be done today and request for your code review again
Attachments:
Last edit: 07 Nov 2012 15:11 by suvsuv.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 15:25 #2756 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
The problem with optimized builds is that they are really hard to debug. That is why it isn't default (It is what I build for final releases though)
As I said, we're not out of ROM. You'll get an error when that happens. If we are out of RAM (and it is not a sure thing) then it is likely because of stack usage.
the summary that Make reports only includes RAM allocated to static variables. any temporary variables that are defined within functions are allocated on the stack, and thse are not accounted for (and can be very large). Additionally, the newc library does implement some malloc() calls (used for sprintf for instance) which go on the heap, and are also not accounted for.
If you have the ability to read from the UART, you can enable HEAP_DEBUG to see heap usage (but not in the prd builds, since those disable the PPM)
I'll get you some more detailed info later.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 16:15 #2757 by suvsuv
PB, please take time to do code review
1) Synced with your latest update
2) Telemetry config and monitor pages are ported, but I don't have an RX to test against. I also want you to provide an option to let user fully shut-off or turn-on the telemetry monitoring in the TX
3) Improve the appearance of the scroll bar
4) Change the orientation of the horizontal bar: 100 is to the left and -100 is to the right, aligning the orientation of the AIL/RUDD sticks
5) Fix bugs

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 16:36 #2758 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)

suvsuv wrote: 2) ... I also want you to provide an option to let user fully shut-off or turn-on the telemetry monitoring in the TX

What is your reasoning here? Is it a concern about power? I've been considering creating a 2nd protocol 'Devo' and 'DevoTelem' to do exactly that, but I really don't see the benefit at the moment.

4) Change the orientation of the horizontal bar: 100 is to the left and -100 is to the right, aligning the orientation of the AIL/RUDD sticks

I understand your reasoning here, but overall i think it is the wrong answer. everyone expects bigger to be to the right. it is how all progress and bar-graphs are made. Maybe it would make sense for the ail/rud bars (only) to be reversed, but overall, this change isn't right.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 16:51 #2759 by suvsuv
Not only the AIL/RUDD sticks, but also their trims' bar are showing in reverse direction against sticks' movement. I am still looking for a better solution.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 17:18 - 07 Nov 2012 17:18 #2760 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
They don't do that on devo8 (or at least at one time i fixed it so the trim bars worked properly).
Last edit: 07 Nov 2012 17:18 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
07 Nov 2012 22:59 - 07 Nov 2012 23:01 #2766 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
I've merged everything (besides the main page and bargraph, and a few text changes you didn't sync from me last time around)

FYI, you should remove your changes to main.c I think. If you compile an optimized build they aren't needed (I get the low power case always with an optimized build) and as I've shown elsewhere, they are at best a band-aid and don't correct the underlying issue.
Last edit: 07 Nov 2012 23:01 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 01:56 #2768 by suvsuv
synced with your merged codes and verified that current consumption returns to normal even if putting the safety and binding checking back into the original 100ms loop. So the debug build slows down the program and does cause performance issue.

I just fixed some new found bugs, please have them merged to your trunk
1) Telemtest_page.c: should initialize scroll_bar, or the TX will hang when keeping pressing UP/DOWN in the 1st telemetry monitor page
2) Label.c: add 1 more line spacing
3) In the main.c , currently you set the initial brightness to 9, which leads to a visible flash light in booting the TX as most users might set the brightness to lower than 5. Just want to know what could happen in the devo8 if this initial value is set to 1 or 2

So far, all deviation 8 features , except for the scanner, are in the devo10, I am working on auto-dimm feature. The remaining known issue is that the more current consumption after manual binding, please let me know once you have further solution for it.

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 02:47 #2769 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)

suvsuv wrote: 3) In the main.c , currently you set the initial brightness to 9, which leads to a visible flash light in booting the TX as most users might set the brightness to lower than 5. Just want to know what could happen in the devo8 if this initial value is set to 1 or 2

setting it to 1 is fine.

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 03:40 #2771 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
I've merged it. Note that I rebuilt the fonts again. Shouldn't affect Chinese or English, but will improve Euro/Cyrillic languages

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum