Changeset 120

Show
Ignore:
Timestamp:
07/05/08 02:43:07 (5 years ago)
Author:
atorf
Message:

Replaced GetMotor? and SetMotor? in internal motor-functions with faster h.NXTMOTOR_getState() and h.NXTMOTOR_setState()

Location:
branches/atorf/RWTHMindstormsNXT
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • branches/atorf/RWTHMindstormsNXT/GetMemoryCount.m

    r117 r120  
    4343% get default handle & motorstate 
    4444h = COM_GetDefaultNXT(); 
    45 NXTMOTOR_State = h.NXTMOTOR_State(); 
     45NXTMOTOR_State = h.NXTMOTOR_getState(); 
    4646 
    4747memory = NXTMOTOR_State(number+1).MemoryCount; 
  • branches/atorf/RWTHMindstormsNXT/GetMotorSettings.m

    r118 r120  
    7272% get default handle & motorstate 
    7373h = COM_GetDefaultNXT(); 
    74 NXTMOTOR_State = h.NXTMOTOR_State(); 
     74NXTMOTOR_State = h.NXTMOTOR_getState(); 
    7575 
    7676 
     
    120120 
    121121% save motor state back to handle 
    122 h.NXTMOTOR_State(NXTMOTOR_State); 
     122h.NXTMOTOR_setState(NXTMOTOR_State); 
    123123 
    124124end%function 
  • branches/atorf/RWTHMindstormsNXT/SendMotorSettings.m

    r119 r120  
    6666%% get handle & motorstate 
    6767h = COM_GetDefaultNXT(); 
    68 NXTMOTOR_State = h.NXTMOTOR_State(); 
     68NXTMOTOR_State = h.NXTMOTOR_getState(); 
    6969 
    7070 
     
    204204 
    205205%% save motor state back to handle 
    206 h.NXTMOTOR_State(NXTMOTOR_State); 
     206h.NXTMOTOR_setState(NXTMOTOR_State); 
    207207 
    208208 
  • branches/atorf/RWTHMindstormsNXT/SetAngleLimit.m

    r119 r120  
    6060%% get default handle & motorstate 
    6161h = COM_GetDefaultNXT(); 
    62 NXTMOTOR_State = h.NXTMOTOR_State(); 
     62NXTMOTOR_State = h.NXTMOTOR_getState(); 
    6363 
    6464whatmotor = h.NXTMOTOR_getCurrentMotor(); 
     
    7575 
    7676%% save motor state back to handle 
    77 h.NXTMOTOR_State(NXTMOTOR_State); 
     77h.NXTMOTOR_setState(NXTMOTOR_State); 
    7878 
    7979 
  • branches/atorf/RWTHMindstormsNXT/SetMemoryCount.m

    r117 r120  
    4444% get default handle & motorstate 
    4545h = COM_GetDefaultNXT(); 
    46 NXTMOTOR_State = h.NXTMOTOR_State(); 
     46NXTMOTOR_State = h.NXTMOTOR_getState(); 
    4747 
    4848NXTMOTOR_State(number+1).MemoryCount = angle; 
    4949 
    5050% save motor state back to handle 
    51 h.NXTMOTOR_State(NXTMOTOR_State); 
     51h.NXTMOTOR_setState(NXTMOTOR_State); 
    5252 
    5353 
  • branches/atorf/RWTHMindstormsNXT/SetPower.m

    r119 r120  
    5555%% Get handle & motorstate 
    5656h = COM_GetDefaultNXT(); 
    57 NXTMOTOR_State = h.NXTMOTOR_State(); 
     57NXTMOTOR_State = h.NXTMOTOR_getState(); 
    5858 
    5959whatmotor = h.NXTMOTOR_getCurrentMotor(); 
     
    7777 
    7878%% save state back to handle 
    79 h.NXTMOTOR_State(NXTMOTOR_State); 
     79h.NXTMOTOR_setState(NXTMOTOR_State); 
    8080 
    8181 
  • branches/atorf/RWTHMindstormsNXT/SetRampMode.m

    r119 r120  
    4747%% get default handle & motorstate 
    4848h = COM_GetDefaultNXT(); 
    49 NXTMOTOR_State = h.NXTMOTOR_State(); 
     49NXTMOTOR_State = h.NXTMOTOR_getState(); 
    5050 
    5151whatmotor = h.NXTMOTOR_getCurrentMotor(); 
     
    7070 
    7171%% save motor state back to handle 
    72 h.NXTMOTOR_State(NXTMOTOR_State); 
     72h.NXTMOTOR_setState(NXTMOTOR_State); 
    7373 
    7474 
  • branches/atorf/RWTHMindstormsNXT/SetTurnRatio.m

    r119 r120  
    7272%% get default handle & motorstate 
    7373h = COM_GetDefaultNXT(); 
    74 NXTMOTOR_State = h.NXTMOTOR_State(); 
     74NXTMOTOR_State = h.NXTMOTOR_getState(); 
    7575 
    7676 
     
    9191 
    9292%% save motor state back to handle 
    93 h.NXTMOTOR_State(NXTMOTOR_State); 
     93h.NXTMOTOR_setState(NXTMOTOR_State); 
    9494 
    9595 
  • branches/atorf/RWTHMindstormsNXT/SpeedRegulation.m

    r119 r120  
    5353%% get default handle & motorstate 
    5454h = COM_GetDefaultNXT(); 
    55 NXTMOTOR_State = h.NXTMOTOR_State(); 
     55NXTMOTOR_State = h.NXTMOTOR_getState(); 
    5656 
    5757%% Check parameter 
     
    101101 
    102102%% save motor state back to handle 
    103 h.NXTMOTOR_State(NXTMOTOR_State); 
     103h.NXTMOTOR_setState(NXTMOTOR_State); 
    104104 
    105105 
  • branches/atorf/RWTHMindstormsNXT/StopMotor.m

    r118 r120  
    7676%% get default handle & motorstate 
    7777h = COM_GetDefaultNXT(); 
    78 NXTMOTOR_State = h.NXTMOTOR_State(); 
     78NXTMOTOR_State = h.NXTMOTOR_getState(); 
    7979 
    8080%% reset regulation state 
     
    131131 
    132132%% save motor state back to handle 
    133 h.NXTMOTOR_State(NXTMOTOR_State); 
     133h.NXTMOTOR_setState(NXTMOTOR_State); 
    134134 
    135135 
  • branches/atorf/RWTHMindstormsNXT/SyncToMotor.m

    r119 r120  
    7474%% get default handle & motorstate 
    7575h = COM_GetDefaultNXT(); 
    76 NXTMOTOR_State = h.NXTMOTOR_State(); 
     76NXTMOTOR_State = h.NXTMOTOR_getState(); 
    7777 
    7878whatmotor = h.NXTMOTOR_getCurrentMotor(); 
     
    145145 
    146146%% save motor state back to handle 
    147 h.NXTMOTOR_State(NXTMOTOR_State); 
     147h.NXTMOTOR_setState(NXTMOTOR_State); 
    148148 
    149149