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

More
19 Nov 2012 14:59 #3004 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)

suvsuv wrote: PB, I had my repo synced with yours, and found 2 bugs
1) The new timer you introduced in the fltk.c won't work for all Windows OSes, at least doesn't work in my Win7 and Win8 machines. In the ftlk.c, you assume that the OS can generate time tick as short as 1milliseconds, but in my test, the shortest tick is 5ms so it ruin many actions in emu_devo10, e.g., long-pressing doesn't work, binding time elapses every 5 seconds instead.
I fixed the issue and had it verified in my Windows machine. I don't know how it work in Linux, please verify the fix if you have Linux environment.

Yeah, getting the tier working correctly on multiple OS was a pain. your fix looks ok I think. the reason I used '==' instead of '>=' is that GT doesn't work if you overflow. On the actual controller this is important. On a PC we should just make the value a 64bit int. I am not yet convinced that the interrupt solution is actually better. In theory it should be, but it also means you need to be very careful with variables and assuming atomic updates. It is very possible I'll need to take that whole thing out.

2) Your fix for the mixer page still doesn't work, I can still make the page crash in both emulator and real devo10, below is the repo steps:
click the last item of the mixer page(illustrated in the following snapshot) and change its template from none to simple, or Expo, after saving the change, the mixer page crashes

I'm not quite willing to admit defeat.

Also ,even though you can fix above issue, I don't think it actually meets your original expectation. You were trying to show as more items as possible in a page by hiding some of them based on their different template setting, but if you look at the following senario, I don't really think your current solution has advantage over fixed-row. As what I explained to you, it is not a good idea to design variable-rows page in devo10(though it works well in devo with sufficient LCD height)

Yeah I know about that issue. I have a solution for it too. I'm not yet ready to believe that the interface isn't capable of a more optimized layout. You may very well end up being right in the end that it just isn't worth it. We'll see.

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

More
20 Nov 2012 01:55 #3009 by suvsuv
I had fixed all issues in the quickpage for devo10
1) In devo10, up/down/left/right/ent/exit/longpress-right/longpress-left are all used in most pages. So the longpress-up and longpress-down are used to switch among different quickpages
2) As mentioned above, there are not too many keys to be selected, so Menu+ and Menu- items are removed from the main-page-config
3) There is no need to separate GPS from telem monitor page any more, I had the page reverted back to its previous version
4) To avoid mistakenly triggering timers in the main page, Right/left, instead of UP/down, are assigned to start/reset timers in the main page.

Please check out the update, the quickpage should work well in devo10 now

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

More
20 Nov 2012 02:44 #3011 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
I actually like the telemetry being 2 separate pages for the quickpage functionality, so I don't want to revert that. I also really like the single-press left/right on the devo10 switching the pages. I care less what the default is, but I want the option of using those. For the pages I choose to put there, it is not an issue to use left/right, and it provides very fast feedback. So I don't think this is the right choice for the timer change. And I don't think there are too many keys to be selected, so I want to keep the menu+/- capability too. It seems to me that using a toggle-spinbox should allow you to select between normal and long-press for any button.

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

More
20 Nov 2012 02:59 #3012 by suvsuv

PhracturedBlue wrote: I actually like the telemetry being 2 separate pages for the quickpage functionality, so I don't want to revert that. I also really like the single-press left/right on the devo10 switching the pages. I care less what the default is, but I want the option of using those. For the pages I choose to put there, it is not an issue to use left/right, and it provides very fast feedback. So I don't think this is the right choice for the timer change. And I don't think there are too many keys to be selected, so I want to keep the menu+/- capability too. It seems to me that using a toggle-spinbox should allow you to select between normal and long-press for any button.

Using the left/right button for quickpage will mistakenly trigger many textsel change in most pages, the quickpage is just a low-pri feature. Users can live without it. Simply put, the quickpage just didn't work in devo10.

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

More
20 Nov 2012 03:40 #3013 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
I'll leave the defaults the way you have them, but I am going to add back the Menu+/- settings so I can change them to the way I like.

You removed the wrap-around feature, which I really want back though.

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

More
20 Nov 2012 05:15 #3014 by suvsuv

PhracturedBlue wrote: I'll leave the defaults the way you have them, but I am going to add back the Menu+/- settings so I can change them to the way I like.

You removed the wrap-around feature, which I really want back though.

What is the “Wrap-around" feature?


I will revert the telem-test page back to your version, and add the menu+/- settings back as you prefer.
However, I strongly doubt if you really "USE" devo10, instead of using devo8 to setup models and then loading them to devo10 to run some simple keystroke testing.

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

More
20 Nov 2012 05:38 - 20 Nov 2012 05:38 #3015 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)

suvsuv wrote: I will revert the telem-test page back to your version, and add the menu+/- settings back as you prefer.

Don't bother for now.

However, I strongly doubt if you really "USE" devo10, instead of using devo8 to setup models and then loading them to devo10 to run some simple keystroke testing.

I am now using both Tx about evenly for mytesting. No passing of models back and forth. But you are right that the amount of time I've actually spent flying is low. For now, I've included your code as is. I'll give it some time and see how I feel about it.
Last edit: 20 Nov 2012 05:38 by PhracturedBlue.

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

More
20 Nov 2012 06:22 #3016 by suvsuv
The quickpage is reverted back to your orginal design with some minor change:
1) If the menu+ and menu- is set to none, TX will use long-press up/down to switch among quick pages
2) The timers is assigned with the following hotkeys: EXT - reset, Up- start/pause

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

More
20 Nov 2012 12:20 #3020 by suvsuv
I add volume control for devo10, need to know your opinion whether it should be in Tx.ini or modelx.ini before porting it to devo8.

At the meantime , I tested the sound.ini from ej189( www.deviationtx.com/forum/3-feedback-que...ns/1039-sound-volume ), changing sound frequency does make the alarm louder. Oppositely , changing volume has no effect on making the sound louder or quieter, so the volume control can only turn on/off the sound currently:

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

More
20 Nov 2012 14:18 #3023 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Thanks. I think it should be a Tx setting.
I'll need to hook up my Tx to a scope and see what is going on. I'm not an expert in piezo speakers, but my understanding is that a narrow pulse-width should result in lower volume.

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

More
20 Nov 2012 15:23 #3031 by suvsuv
The volume setting is also in the devo8's TX config page, feel free to change its layout position as your preference

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

More
20 Nov 2012 15:43 #3035 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Thanks,
FYI, for now I actually think I want to remove the control of the quick-page buttons. Eventually I want this capability, but the buttons should be set for the Tx, not the model. This is important because sharin gmodels between the Devo10 and Devo8 would result is saving the quickpage buttons, which would almost certainly be the wrong thing to do.
Eventually, I'm thinking of making a 'button config' page that will allow assigning button on the main page, but for the moment that can wait.

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

More
20 Nov 2012 16:01 #3041 by suvsuv

PhracturedBlue wrote: Thanks,
FYI, for now I actually think I want to remove the control of the quick-page buttons. Eventually I want this capability, but the buttons should be set for the Tx, not the model. This is important because sharin gmodels between the Devo10 and Devo8 would result is saving the quickpage buttons, which would almost certainly be the wrong thing to do.
Eventually, I'm thinking of making a 'button config' page that will allow assigning button on the main page, but for the moment that can wait.

I think so. Also the quickpage setting is better to put in TX file, because some pages, such as scanner/gps , are missing from either devo8 or devo10. Assuming a devo8's model file is copied to devo10 with scanner quickpage, it should lead to pagecrash and then make the user scared.

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

More
20 Nov 2012 16:03 #3043 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)

suvsuv wrote: I think so. Also the quickpage setting is better to put in TX file, because some pages, such as scanner/gps , are missing from either devo8 or devo10. Assuming a devo8's model file is copied to devo10 with scanner quickpage, it should lead to pagecrash and then make the user scared.

It won't crash the transmitter. the loader will ignore pages it doesn't know about. As I stated before, the quickpage does belong with the model.

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

More
20 Nov 2012 18:51 - 20 Nov 2012 18:54 #3048 by vlad_vy
Replied by vlad_vy on topic PB, request for code review and merge back(2)

PhracturedBlue wrote: Thanks. I think it should be a Tx setting.
I'll need to hook up my Tx to a scope and see what is going on. I'm not an expert in piezo speakers, but my understanding is that a narrow pulse-width should result in lower volume.


I think it's not so simple for piezo speakers. You can try modulate basic square wave positive pulse with high frequency PWM (maybe 30-45kHz). This way you can change amplitude of pulse without audible noises. Will be nice to have diagram of speaker driver.
Last edit: 20 Nov 2012 18:54 by vlad_vy.

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

More
20 Nov 2012 19:02 #3050 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Sorry, I should have said duty-cycle, not pulsewidth. All documentation I can find says that max-volume occurs at 50% duty-cycle, and reduces as the duty-cycle is reduced (or increased).

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

More
20 Nov 2012 19:09 - 20 Nov 2012 19:10 #3052 by vlad_vy
Replied by vlad_vy on topic PB, request for code review and merge back(2)
I understand that, but it does not work. Can you try modulate 50% duty-cycle with high frequency PWM? Or at least by square wave (50% volume).
Last edit: 20 Nov 2012 19:10 by vlad_vy.

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

More
20 Nov 2012 19:14 #3054 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
Right. It doesn't work. Which is why I need to hook it up to my scope and see if it is a software or hardware problem

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

More
20 Nov 2012 19:15 - 20 Nov 2012 19:24 #3055 by PhracturedBlue
Replied by PhracturedBlue on topic PB, request for code review and merge back(2)
FYI, there is no circuit for the speaker driver.
It is MCU GPIO->p-fet->piezo speaker
Last edit: 20 Nov 2012 19:24 by PhracturedBlue.

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

More
20 Nov 2012 19:16 #3056 by FDR
Please check what the original fw does. That is quite loud...

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

Time to create page: 0.067 seconds
Powered by Kunena Forum