Advice needed for new feature

More
10 May 2013 12:51 #9793 by Pixel166
Advice needed for new feature was created by Pixel166
Hi,

I'm currently writing a new feature for the Deviation firmware, but I need some advices on how I could do the setup process.

My feature is (on my mind) very interesting for other user in the same case : one heli with different battery capacity. This involve different values for the timer.
In my example, I'm flying a Walkera Ladybird with 3 LiPo : 200mAh, 240mAh and 350mAh. Countdowns are respectively 3min30, 4min30 and 7min.

So my feature is to allow different staring values for a timer, depending on a switch position. This allow me to have only 1 model file for 1 heli instead of 3 model files for each heli.

The feature is currently working well if I modify the model file by hand (adding 2 lines : 1 for the switch to use, and 1 with comma-separated values for each position).

My question is how to add this setup is the timer page so that it's easy to use ?

Thx

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

More
10 May 2013 14:28 #9801 by FDR
Replied by FDR on topic Advice needed for new feature
The question for me would be: how do not forget to switch the initial timer value! ;)

That's why I rather rely on the telemetry voltage...

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

More
10 May 2013 20:59 - 10 May 2013 21:08 #9813 by domcars0
Replied by domcars0 on topic Advice needed for new feature
I think that this feature allready exists ;)
You just need to configure virtual channels to use as switch input for each timers.
Here is a sample for 3 timers (3 batteries models). You use the MIX switch to choose your battery model.

[virtchan1]
template=complex
[mixer]
src=THR
dest=Virt1
switch=MIX0
usetrim=0
[mixer]
src=AIL
dest=Virt1
switch=!MIX0
scalar=-100
usetrim=0
curvetype=fixed

[virtchan2]
template=complex
[mixer]
src=ELE
dest=Virt2
switch=!MIX1
scalar=-100
usetrim=0
curvetype=fixed
[mixer]
src=THR
dest=Virt2
switch=MIX1
usetrim=0
[virtchan3]
template=complex
[mixer]
src=THR
dest=Virt3
switch=MIX2
usetrim=0
[mixer]
src=AIL
dest=Virt3
switch=!MIX2
scalar=-100
usetrim=0
curvetype=fixed

[timer1]
type=countdown
src=Virt1
time=355
[timer2]
type=countdown
src=Virt2
time=550
[time3]
type=countdown
src=Virt3
time=800


But: "do not forget to switch the initial timer value!"(FDR) :)

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 10 May 2013 21:08 by domcars0.

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

More
11 May 2013 07:36 #9834 by Pixel166
Replied by Pixel166 on topic Advice needed for new feature
Maybe I don't understand what you want to do with those virtual channels, but I think this don't solve my problem, as there are already 3 timers (and I already know how to setup 3 timers, even without mixer.

In my main page, I have 1 stop watch, and 1 countdown, and I want that this countdown "reset value" could be different depending on a switch position during reset (reset by a long press or a switch).

With your setup, what I understand is that I need 3 boxes for each timer, or I need to choose to good timer in the box each time I change battery model. Isn't it ? (I'm asking, because if I don't understand what you explain, I don't need to develop my feature ;) )

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

More
11 May 2013 08:44 #9835 by domcars0
Replied by domcars0 on topic Advice needed for new feature
Hi Pixel166,
As I don't speak english very well, it will be too difficult for me to explain.
Try to setup the config I gave before and I'msure you will understand.

You will have 3 timers. The first will start countdown from 355sec. with the THR only if MIX switch is on MIX0, the second will start countdown from 550sec. with THR only if MIX switch is on MIX1 and the third
will start countdown from 800sec. with THR only if MIX switch is on MIX2.
Yes I known to do that you use 3 timers (and your mod will use only one timer).

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:

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

More
11 May 2013 09:40 #9836 by Pixel166
Replied by Pixel166 on topic Advice needed for new feature
I understand your explaination (and my english isn't very good as I'm also french ;) ), but the thing I don't understand in your setup is how could I add your 3 timers in the main page without using 3 boxes, or switching from 1 to another each time I change my battery ?

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
11 May 2013 10:38 #9838 by rbe2012
Replied by rbe2012 on topic Advice needed for new feature
Every box can only have one source. Depending on the switch the time in one box will run (and you can not make this dependent to another switch like "Ch3"), but if you do not want to change the screen config every time you move the switch you will have to use three boxes in parallel.
For me the way domcars0 described can be a solution, but is not covering your idea completely.

But remember FDRs thought: how do not forget to switch the initial timer value!

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

More
11 May 2013 10:46 - 11 May 2013 11:23 #9839 by domcars0
Replied by domcars0 on topic Advice needed for new feature

Pixel166 wrote: I understand your explaination (and my english isn't very good as I'm also french ;) ),

So you understand frenglish!! Super! :woohoo:

Pixel166 wrote: but the thing I don't understand in your setup is how could I add your 3 timers in the main page without using 3 boxes, or switching from 1 to another each time I change my battery ?

Yes you need 3 boxes (and only one will be usefull) if you want to see those timers (do you really need to see them?) ... I know that this is not what you exactly want with your feature but it's so easy. Your feature is nice but implementation of the gui is really the hard part :(
In fact you want a new timer type, a countdown timer with a start time
depending of a switch. So on the GUI you need to ask which swich and depending of this switch X start times... not so easy :-(

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 11 May 2013 11:23 by domcars0.

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
11 May 2013 10:49 - 11 May 2013 10:49 #9840 by rbe2012
Replied by rbe2012 on topic Advice needed for new feature
To give some hints:
The gui has a lot of elements of different kind (labels, images, rectangles, text select boxes ans more). They are used to display anything you can see on the screen.
If you want to add additional capabilities you will have to
- design a new page or change an existing with gui elements which allow to configure the new capabilities
- change the methods where these values will be used (in your case maybe where the switch state is recognized, but only if the timer is not running? But one of them will always run or you would have to spare one switch state)
- change writing and reading the model config file - otherwise your configuration will be lost when changing model or switching the tx off.

I have done quite a lot development for the gui and I can tell you that it is really hard work to get used to it (I can count this in weeks or months... and find continuously new things).
Maybe if your idea is one of general interest you could make a proposal for enhancement (on bitbucket) - if it is important enough someone will implement it sooner or later.

My personal opinion: I don't need this. I also have different batteries for some models (one, to be honest, a quad with 2.200 and 3.300 mAh) but I use different model configs (identical except for the timers) for this.

EDIT: I simply needed more time than domcars...
Last edit: 11 May 2013 10:49 by rbe2012.

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

More
27 May 2013 08:08 #10338 by myxiplx
Replied by myxiplx on topic Advice needed for new feature
Hey folks,

Not sure if there's an official wish list for this project, but I'd love to have timers more easily adjustable from the main page.

I realise we can make this work by using 3 timers, but I'd like to have this running from just one, so I can fit it into my display on the main page, and what I think is really needed is an update to the timer, allowing it to be modified by switches.

The options I can think of are:

1. Have a switch as a timer modifier, with up to 3 timer values that can be triggered by flicking the switch.

2. Optionally allow more than 3 values, configurable by combinations of switches, or by having a switch act to take a percentage off the time.

3. Allow a button / control to modify the timer from the home screen. I'd like to flick a switch, and then be able to use the left/right buttons to edit the timer.

The first of these would be my preference, it would let me set up 3 runtimes to suit the various batteries / fly times, and quickly flick to the appropriate run time.

The second of these is more advanced, but having a switch modify the values would be great. That would give me even better control, letting me adjust for both the battery, and for the type of flying I'm planning.

So I would toggle the first switch to chose the battery type, and set the initial run time. With that set, I'd use my flight mode switch as a further modifier. Standard mode is what I use for indoor gentle flying or hovering, that would leave the time unchanged. F1 is my outdoor mode and is a little harder on the battery, I'd like that to take 25% off the timer. F2 is my 3D mode, and for that I need to halve the times.

That would let the times adjust much more accurately to what I'm actually going to get from the batteries, and would protect them a lot better.

Cheers,

Ross

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

Time to create page: 0.042 seconds
Powered by Kunena Forum