Menu

Device reboots when attempting to set cloud model values.

Ryan Parle
2022-05-28
2022-05-29
  • Ryan Parle

    Ryan Parle - 2022-05-28

    since updating to 128-36 i have found that when ever i try to change any of the values related to the cloud model my device will go unresponsive and eventually reboot, this happens when I set any new value, both in the management interface and in the windows application.

    the info from the serial port debug is attached.

     

    Last edit: Ryan Parle 2022-05-28
  • brownrb

    brownrb - 2022-05-29

    Hi Ryan
    Please make the following changes to tcpip_server.cpp

    case 44:
    line 760
    Insert new line
    case 44: // Set cloud model k1..k7, seperated by ,
    WorkString = receiveString.substring(4, receiveString.length() - 1);
    WorkString = WorkString + '#';

    Please make the following changes to managementdserver.cpp

    in managementserver.cpp
    line 2291, 2309, 2327, 2401, 2405
    change
    handler_postadmin5();
    to
    handler_getadmin5();

     

    Last edit: brownrb 2022-05-29
  • Ryan Parle

    Ryan Parle - 2022-05-29

    That has partially fixed the problem, I can now change all cloud model values using the management interface without any issues.
    However if i use the windows application all K factors get set to the value entered for K1, For example i enter K factors as 33,24,48,64,64,48,24 hit send, then when i click get it returns 33,33,33,33,33,33,33

    Application error log attached

     
  • brownrb

    brownrb - 2022-05-29

    Hi Ryan
    I will have a look and post back soon

     
    • brownrb

      brownrb - 2022-05-29

      in tcpip_server.cpp

      Line 758 onwards
      change case 44: to

       case 44: // Set cloud model k1..k7, seperated by ,
            WorkString = receiveString.substring(4, receiveString.length() - 1);
            WorkString = WorkString + '#';
            if ( WorkString == "" )
            {
              nullarg( cmdval );
            }
            else
            {
              // find 1st val from start to first ,
              int idx = 0;
              String str;
              char ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k1(ival);
              // move past comma
              idx++;
              str = "";
              // get k2
              ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k2(ival);
              // move past comma
              idx++;
              str = "";
              // get k3
              ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k3(ival);
              // move past comma
              idx++;
              str = "";
              // get k4
              ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k4(ival);
              // move past comma
              idx++;
              str = "";
              // get k5
              ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k5(ival);
              // move past comma
              idx++;
              str = "";
              // get k6
              ch = WorkString[idx];
              while ( ch != ',' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k6(ival);
              // move past comma
              idx++;
              str = "";
              // get k7
              ch = WorkString[idx];
              while ( ch != '#' )
              {
                str = str + ch;
                idx = idx + 1;
                ch = WorkString[idx];
              }
              str = str + "";
              ival = str.toInt();
              ControllerData->set_k7(ival);
              // done
            }
            break;
      
       
  • Ryan Parle

    Ryan Parle - 2022-05-29

    I think that fixed it, changes seem to work with both methods now.
    I'll test for a bit and let you know if there are any issues. Thanks for the quick responses.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.