diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index c92b8e41a63518f660e4575483aa1ea8c9f99ddd..fa3d263678179fb96aae9cc3780cf7daa2e39558 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -1331,21 +1331,21 @@ static float demo_current_float(){ static int cursor; cursor++; cursor = cursor % MAX_PREPARED_RAND; - return (float)(5 + randfloat[cursor] / 1000000000); + return (float)(9.8 + 0.04 * (randint[cursor] % 10) + randfloat[cursor]/1000000000); } static int32_t demo_voltage_int(){ static int cursor; cursor++; cursor = cursor % MAX_PREPARED_RAND; - return 210 + randint[cursor] % 20; + return 215 + randint[cursor] % 10; } static float demo_phase_float(){ static int cursor; cursor++; cursor = cursor % MAX_PREPARED_RAND; - return (float)(120 + randfloat[cursor] / 1000000000); + return (float)((115 + randint[cursor] % 10 + randfloat[cursor]/1000000000)/360); } #if 0