Blades "1"

Post Reply
sirzepp
Posts: 3
Joined: Wed Oct 30, 2013 1:56 pm
Country: -

Blades "1"

Post by sirzepp »

I did a quick search and this topic didn't come up. On the Taranis I can only select as low as 2 Blades on the Telemetry setup screen. Is there any way to drop it down to 1? I want to use the Tachometer output off the RCEXL ignition, and I believe it pulses with the Hall sensor which would be just once per rev. Is there a way to 'add' to the amount so the number displayed is accurate. I can do the math in my head...and frankly I'm not even sure the tachometer output will work with the telemetry hub...I haven't finished the plane yet. Still, thought I'd ask.

Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Blades "1"

Post by Bruneaux »

sirzepp.

I raised that issue last fall. It was submitted but it got a rather low priority.

A lot of people are running gas engines and the RPM is a true RPM (no blades, or 1 blade).

Hope they still have it listed as something to correct.

Bruneaux
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

the 'next' branch now allows 1 blade
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Blades "1"

Post by Bruneaux »

Thanks bertrand.

And sirzepp, I have a Saito gas engine with a lead for tachometer. I also have the old style hub. I just made an adapter and plugged the tach in. Shazzam! And the old JR and Futaba transmitter packs (with the small FrSky display) do allow a single blade. And it appears that the next version of openTx will have it as well.

Bruneaux
Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

Thank you Bertrand! This keeps sneaking back in.

Any value that references Blades needs to change from +2 to +1 as well, I'll have a dig through.

Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

EDIT: I see how you worked around this, simply set MIN_BLADES -1 (with the +2 everywhere, this gives you 1). Now we just need to increase the blade count to allow for Electric Motor RPM sensors like the Eagletree units (uses Motor Pole count), 20 should be a good high enough number for now.

---

Looks like it's still there, just pulled the items below from Next. Still all reference 2 blades minimum.



Line 178 in opentx/radio/src/telemetry / frsky.cpp

frskyData.hub.rpm *= (uint8_t)60/(g_model.frsky.blades+2);

---

Line 1132 in opentx/radio/src/myeeprom.h

int8_t blades; // How many blades for RPMs, 0=2 blades

---

Line 175 in radio/src/eeprom_conversions.cpp

uint8_t blades; // How many blades for RPMs, 0=2 blades, 1=3

---

Lines 753 onwards in companion/src/helpers.cpp

QString getFrSkyBlades(int blades)
{
switch (blades) {
case 1:
return "3";
case 2:
return "4";
default:
return "2";
}
}
Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

Companion is still showing 2 to 4 as min and max blades. Have to see if they tried to use -1 as well since Companion occasionally typecasts blades as an unsigned int.

Taranis simulator also lets you select "0" as the minimum blade count, suspect offending code is:

opentx / radio / src / gui / menu_model.cpp:
case ITEM_TELEMETRY_USR_BLADES:
lcd_putsLeft(y, STR_BLADES);
lcd_outdezAtt(TELEM_COL2+FWNUM, y, 1+g_model.frsky.blades, attr);
Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

Won't the typecasting in eeprom conversion also cause issues as its an uint?

Line 175 in radio/src/eeprom_conversions.cpp

uint8_t blades; // How many blades for RPMs, 0=2 blades, 1=3
Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

Just submitted a pull request with all references of Blade to allow for 0 based (0=1 blade) and a max of 20 blades / poles.
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

We want that the default remains 2 blades. I just commited a fix for this one.
Thorvald
Posts: 44
Joined: Thu Aug 08, 2013 12:06 pm
Country: -

Re: Blades "1"

Post by Thorvald »

Bertrand, my pull request was not to change the default of 2 (if I did, my mistake). My change was to remove all the other issues I pointed out above.

Setting Blades Min to -1 was not fully thought out. There was an instance on line 175 of eeprom conversions where a uint was used (unsigned), that would need to be changed to allow for signed values.

It makes much more sense to start at 0 and work up, I figured you are very busy with other more important matters so I created the pull request to save you the time of typing all those changes out. Someone is going to look at the code years later and be baffled why Blades would start at -1 to represent 1, fix it now while we have the chance to make the code cleaner and easier to read.

Also companion was not changed to reflect this ability, it was still locked to values of 2,3,4. My pull included the fix to companion and also added the ability to set blades to a maximum of 20.

---

Don't just think of basic optical sensors that need to divide by "number of propeller blades". We also have to think of ESC RPM Sensors like the Eagletree unit and others that need to divide by the Pole count of the motor (Blades also refers to Poles when talking RPM telemetry).

People are going to start using RPM in LUA scripts soon to do amazing things and we need to be 100% sure that the value is accurate in both the radio and in companion.


Thanks
Tim
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Blades "1"

Post by MikeB »

On er9x/ersky9x, I've allowed for blades to be set up to 127. This allows for heli users who want to include the gear ratio, as well as multiple pulses from the motor, to get the head RPM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

127 (or even 127+2=129) is not a problem, but is it really needed?
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Blades "1"

Post by Kilrah »

I think I remember Mike added it following a request from someone. We might even have gotten the same way back in googlecode.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Blades "1"

Post by jhsa »

On electric helis, sensing the motor RPM and knowing the gear ratio, you will now the rotor RPM.

Sent from my GT-I9195 using Tapatalk
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

So ... which could be a reasonable max ?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Blades "1"

Post by jhsa »

MikeB wrote:On er9x/ersky9x, I've allowed for blades to be set up to 127. This allows for heli users who want to include the gear ratio, as well as multiple pulses from the motor, to get the head RPM.

Mike.
Sent from my GT-I9195 using Tapatalk
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Blades "1"

Post by bertrand35 »

128 :)

Post Reply

Return to “openTx for FrSky radios”