Changeset 355

Show
Ignore:
Timestamp:
09/29/08 19:53:55 (5 years ago)
Author:
atorf
Message:

More research (and a little GUI) for NXC hybrid motor control

Location:
branches/atorf/NXC
Files:
2 added
3 modified

Legend:

Unmodified
Added
Removed
  • branches/atorf/NXC

    • Property svn:ignore
      •  

        old new  
        11*.asv 
         2*.bak 
  • branches/atorf/NXC/MotorControl.nxc

    r290 r355  
    2525            // read values 
    2626             
     27 
    2728            tmp      = SubStr(in,  0, 1);  // pos 0 
    2829            port     = StrToNum(tmp); 
  • branches/atorf/NXC/TestMotorControl.m

    r290 r355  
    11 
    2  
     2COM_CloseNXT('all'); 
    33COM_SetDefaultNXT(COM_OpenNXT('bluetooth.ini', 'check')); 
    44 
     
    99 
    1010% RotateMotorEx(outputs, pwr, angle, turnpct, sync, stop)        
    11 RotateMotor(1, 50, 90, 0, false, false) 
     11RotateMotor(1, 50, 1000, 0, false, true) 
     12 
     13pause(0.5) 
     14data = []; 
     15tmp = GetMotorSettings(1); 
     16 
     17while(tmp.IsRunning) 
     18    tmp = GetMotorSettings(1); 
     19    data = [data; tmp.Angle] 
     20 
     21end 
    1222 
    1323 
    1424 
    15 COM_CloseNXT(COM_GetDefaultNXT); 
     25%COM_CloseNXT(COM_GetDefaultNXT);