Author Topic: Weird rounded value  (Read 3922 times)

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Weird rounded value
« on: March 29, 2017, 11:07:18 AM »
Hello,

i have make this command:

Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Set decimal [xplane!sim/cockpit/misc/barometer_setting2] value to the value of [xplane!sim/weather/barometer_sealevel_inhg]
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Set decimal [currentqnh] value to the value of [xplane!sim/cockpit/misc/barometer_setting2] (round to 2 decimal places)
Say, 'qnh is set {DEC:currentqnh}'


The problem is text to speech not say the rounded value but the full value with many many zeros and others...

Do you have an idea for text to speech just say the decimal value rounded to 2 decimal places ?

Thank you.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4784
  • RTFM
Re: Weird rounded value
« Reply #1 on: March 29, 2017, 11:49:26 AM »
Try this:
Code: [Select]
qnh is set {TXTREPLACEVAR:"{DEC:currentqnh}":",":"."}If you use a comma (",") as your decimal separator rather than a dot ("."), the English TTS voices will ignore it.