Fleet speed control

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Fleet speed control

      hi~~

      Fleet speed control is 10% 20% ... 90% 100% possible.
      The speed control I want is 1% 2% ... 99% 100%.
      Can I fix it in 1% increments?

      Basic code
      return array(10 => 100, 9 => 90, 8 => 80, 7 => 70, 6 => 60, 5 => 50, 4 => 40, 3 => 30, 2 => 20, 1 => 10);

      Can not this code
      return array(10 => 100, .............1.1 => 11, 1 => 10, 0.9 => 9, 0.8 => 8, 0.7 => 7, 0.6 => 6, 0.5 => 5, 0.4 => 4, 0.3 => 3, 0.2 => 2, 0.1 => 1);
      --------------------------------------------------------------------------------------
    • foreach range should help you since what you want is loop numbers

      something like

      ---


      $speed = array();

      foreach (range(100,1) as $Speeds){
      $speed[$Speeds] = $Speeds;
      }

      return $speed;


      --

      btw, that's a primitive snippet sent from mobile, change for your needs.
    • dd

      Qwa wrote:

      foreach range should help you since what you want is loop numbers

      something like

      ---


      $speed = array();

      foreach (range(100,1) as $Speeds){
      $speed[$Speeds] = $Speeds;
      }

      return $speed;


      --
      btw, that's a primitive snippet sent from mobile, change for your needs.

      Thanks you Qwa.

      It is displayed well in the speed selection part.
      However, the speed is shown below.

      1 -> 10% speed
      .
      .
      10-> 100% speed
      .
      .
      20-> 200% speed
      .
      .
      100 -> 1000% speed

      My 2moons is 1.3

      Can you download the link below and review it? if you have time?


      drive.google.com/file/d/133ndQ…QUHUp34a/view?usp=sharing
      --------------------------------------------------------------------------------------
    • Have you tried $speed*0.1 ?

      Sorry can't confirm yet. I'm traveling and my only way to access is my smartphone.
    • Qwa wrote:

      Have you tried $speed*0.1 ?

      Sorry can't confirm yet. I'm traveling and my only way to access is my smartphone.
      Please enjoy your traveling.
      A glass of beer. :D :D
      --------------------------------------------------------------------------------------