Changeset 308

Show
Ignore:
Timestamp:
09/25/08 18:56:32 (5 years ago)
Author:
behrens
Message:

add modification

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/doc/html/functions/CommandLayers.html

    r292 r308  
    4848    <td><b>High Level Functions</b></td> 
    4949    <td valign="top"><b>SendMotorSettings</b><br>SetMotor<br>SetPower<br>SetAngleLimit<br>SetRampMode<br>SpeedRegulation<br>SyncToMotor<br><br><b>StopMotor</b><br><br><b>GetMotorSettings</b><br>GetMotor<br><br><b>ResetMotorAngle</b><br><br>SetMemoryCount<br>GetMemoryCount</td> 
    50     <td valign="top"><b>OpenLight<br>OpenSound<br>OpenSwitch<br>OpenUltrasonic<br>OpenAccelerator<br>OpenInfrared<br><br>GetLight<br>GetSound<br>GetSwitch<br>GetAccelerator<br>GetInfrared<br>GetUltrasonic</b><br>USMakeSnapshot<br>USGetSnapshotResults<br><b><br>CloseSensor</b></td> 
     50    <td valign="top"><b>OpenLight<br>OpenSound<br>OpenSwitch<br>OpenUltrasonic<br>OpenAccelerator<br>OpenInfrared<br>OpenCompass<br><br>GetLight<br>GetSound<br>GetSwitch<br>GetAccelerator<br>GetInfrared<br>GetUltrasonic</b><br>USMakeSnapshot<br>USGetSnapshotResults<br><b>GetCompass</b><br>CalibrateCompass<br><br><b>CloseSensor</b></td> 
    5151    <td valign="top">readFromIniFile<br><br>MAP_GetCommModule<br>MAP_GetInputModule<br>MAP_GetOutputModule<br>MAP_GetSoundModule<br>MAP_GetUIModule<br><br>MAP_SetOutputModule</td> 
    5252    <td valign="top"><b>COM_OpenNXT</b><br>COM_OpenNXTEx<br><br><b>COM_CloseNXT</b><br><br><b>COM_ReadI2C</b><br></td> 
  • trunk/mfiles/COM_OpenNXT.m

    r307 r308  
    2929% 
    3030% 
    31 % Limitations of |COM_CloseNXT| 
     31% Limitations of COM_CloseNXT 
    3232%   If you call |COM_CloseNXT('all')| after a |clear all| command has been 
    3333%   issued, the function will not be able to close all remaining open USB 
  • trunk/mfiles/COM_OpenNXTEx.m

    r307 r308  
    5858%    
    5959% 
    60 % Limitations of |COM_CloseNXT| 
     60% Limitations of COM_CloseNXT 
    6161%   If you call |COM_CloseNXT('all')| after a |clear all| command has been 
    6262%   issued, the function will not be able to close all remaining open USB 
  • trunk/mfiles/COM_ReadI2C.m

    r307 r308  
    7777%   Copyright: 2007-2008, RWTH Aachen University 
    7878% 
     79; 
     80% 
     81% *********************************************************************************************** 
     82% *  This file is part of the RWTH - Mindstorms NXT Toolbox.                                    * 
     83% *                                                                                             * 
     84% *  The RWTH - Mindstorms NXT Toolbox is free software: you can redistribute it and/or modify  * 
     85% *  it under the terms of the GNU General Public License as published by the Free Software     * 
     86% *  Foundation, either version 3 of the License, or (at your option) any later version.        * 
     87% *                                                                                             * 
     88% *  The RWTH - Mindstorms NXT Toolbox is distributed in the hope that it will be useful,       * 
     89% *  but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS  * 
     90% *  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.             * 
     91% *                                                                                             * 
     92% *  You should have received a copy of the GNU General Public License along with the           * 
     93% *  RWTH - Mindstorms NXT Toolbox. If not, see <http://www.gnu.org/licenses/>.                 * 
     94% *********************************************************************************************** 
    7995 
    8096 
  • trunk/mfiles/Contents.m

    r173 r308  
    1 % RWTH - Mindstorms NXT Toolbox  
    2 % Version 2.00beta 17-Jul-2008 
     1% RWTH - Mindstorms NXT Toolbox 
     2% Version 2.00 25-Sep-2008 
    33% Files 
    4 %   checkStatusByte           - Interpretes the status byte of a return package and creates an error message 
    5 %   CloseSensor               - Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor) 
    6 %   COM_CloseNXT              - Closes and deletes a specific NXT handle, or clears all existing handles 
    7 %   COM_CollectPacket         - Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet 
    8 %   COM_CreatePacket          - Generates a valid Bluetooth packet ready for transmission (i.e. calculates length) 
    9 %   COM_GetDefaultNXT         - Returns the global default NXT handle if it was previously set 
    10 %   COM_MakeBTConfigFile      - Creates a Bluetooth configuration file which is needed to open a Bluetooth connection. 
    11 %   COM_OpenNXT               - Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use 
    12 %   COM_OpenNXTEx             - Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use 
    13 %   COM_SendPacket            - Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port) 
    14 %   COM_SetDefaultNXT         - Sets a global default NXT handle that will be used by other functions if no handle is specified. 
    15 %   DebugMode                 - Gets or sets the debug state (i.e. if textOut will print messages to the command window) 
    16 %   GetLight                  - Reads the current value of the NXT light sensor 
    17 %   GetMemoryCount            - Gets the internal NXT memory counter (manual mapping replica) 
    18 %   GetMotor                  - Reads the current motor set by SetMotor(). Raises an error if no motor was set 
    19 %   GetMotorSettings          - Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor 
    20 %   GetSound                  - Reads the current value of the NXT sound sensor 
    21 %   GetSwitch                 - Reads the current value of the NXT switch / touch sensor 
    22 %   GetUltrasonic             - Reads the current value of the NXT ultrasonic sensor 
    23 %   MAP_GetCommModule         - Reads the IO map of the communication module 
    24 %   MAP_GetInputModule        - Reads the IO map of the input module 
    25 %   MAP_GetOutputModule       - Reads the IO map of the output module 
    26 %   MAP_GetSoundModule        - Reads the IO map of the sound module 
    27 %   MAP_GetUIModule           - Reads the IO map of the user interface module 
    28 %   MAP_SetOutputModule       - Writes the IO map to the output module 
    29 %   MOTOR_A                   - Symbolic constant MOTOR_A (returns 0) 
    30 %   MOTOR_B                   - Symbolic constant MOTOR_B (returns 1) 
    31 %   MOTOR_C                   - Symbolic constant MOTOR_C (returns 2) 
    32 %   MotorRotateAbs            - Rotates a motor to an absolute angle 
    33 %   NXT_GetBatteryLevel       - Returns the current battery level in milli volts 
    34 %   NXT_GetFirmwareVersion    - Returns the protocol and firmware version of the NXT 
    35 %   NXT_GetInputValues        - Processes a complete sensor reading, i.e. requests input values and collects the answer. 
    36 %   NXT_GetOutputState        - Requests and retrieves an output motor state reading 
    37 %   NXT_LSGetStatus           - Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic) 
    38 %   NXT_LSRead                - Reads data from a low speed (digital) sensor 
    39 %   NXT_LSWrite               - Writes the given data to a low speed (digital) sensor 
    40 %   NXT_PlaySoundFile         - Plays the given sound file on the NXT Brick 
    41 %   NXT_PlayTone              - Plays a tone with the given frequency and duration  
    42 %   NXT_ReadIOMap             - Reads the IO map of the given module ID 
    43 %   NXT_ResetInputScaledValue - Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode) 
    44 %   NXT_ResetMotorPosition    - Resets NXT internal counter for specified motor, relative or absolute counter 
    45 %   NXT_SendKeepAlive         - Sends a KeepAlive packet. Optional: requests sleep time limit. 
    46 %   NXT_SetBrickName          - Sets a new name for the NXT Brick (connected to the specified handle) 
    47 %   NXT_SetInputMode          - Sets mode, configures and initializes sensor ready to be read out 
    48 %   NXT_SetOutputState        - Sends previously specified settings to current active motor. 
    49 %   NXT_StartProgram          - Starts the given program on the NXT Brick 
    50 %   NXT_StopProgram           - Stops a specific program on the NXT Brick 
    51 %   NXT_StopSoundPlayback     - Stops the current sound playback 
    52 %   NXT_WriteIOMap            - Writes the IO map to the given module ID 
    53 %   OpenLight                 - Sets the parameter mode of the NXT light sensor 
    54 %   OpenSound                 - Sets the parameter mode of the NXT sound sensor 
    55 %   OpenSwitch                - Sets the parameter mode of the NXT switch / touch sensor 
    56 %   OpenUltrasonic            - Initializes and sets the mode of the NXT ultrasonic sensor 
    57 %   readFromIniFile           - Reads parameters from a configuration file (usually *.ini) 
    58 %   ResetMotorAngle           - Resets the relative angle counter for the given motor 
    59 %   SendMotorSettings         - Sends previously specified settings to current active motor. 
    60 %   SENSOR_1                  - Symbolic constant SENSOR_1 (returns 0) 
    61 %   SENSOR_2                  - Symbolic constant SENSOR_2 (returns 1) 
    62 %   SENSOR_3                  - Symbolic constant SENSOR_3 (returns 2) 
    63 %   SENSOR_4                  - Symbolic constant SENSOR_4 (returns 3) 
    64 %   SetAngleLimit             - Sets the angle limit (in degrees) of the current motor port 
    65 %   SetMemoryCount            - Sets the internal NXT memory counter (manual mapping replica) 
    66 %   SetMotor                  - Sets the current motor to use for motor setting commands 
    67 %   SetPower                  - Sets the power of the current active motor 
    68 %   SetRampMode               - Sets the runstate of the current active motor 
    69 %   SetTurnRatio              - Sets the turn ratio of the current active motor 
    70 %   SpeedRegulation           - Enables / disables the speed regulation mode of the current active motor 
    71 %   StopMotor                 - Stops / brakes specified motor. (Synchronisation will be lost after this) 
    72 %   SwitchLamp                - Switches the LEGO lamp on or off (has to be connected to a motor port) 
    73 %   SyncToMotor               - Enables synchronization regulation for current active and specified motor 
    74 %   textOut                   - Wrapper for fprintf() which can optionally write screen output to a logfile 
    75 %   tictic                    - Similar to MATLAB's tic(), but extended to save "more states" 
    76 %   toctoc                    - Similar to MATLAB's toc(), but extended to save "more states" 
    77 %   USGetSnapshotResults      - Retrieves up to eight echos (distances) stored inside the US sensor 
    78 %   USMakeSnapshot            - Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos 
    79 %   WaitForMotor              - Pauses execution until specific motor is not running anymore.  
     4%   CalibrateCompass           - Enables calibration mode of the HiTechnic compass sensor 
     5%   checkStatusByte            - Interpretes the status byte of a return package and creates an error message 
     6%   CloseSensor                - Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor) 
     7%   COM_CloseNXT               - Closes and deletes a specific NXT handle, or clears all existing handles 
     8%   COM_CollectPacket          - Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet 
     9%   COM_CreatePacket           - Generates a valid Bluetooth packet ready for transmission (i.e. calculates length) 
     10%   COM_GetDefaultNXT          - Returns the global default NXT handle if it was previously set 
     11%   COM_MakeBTConfigFile       - Creates a Bluetooth configuration file which is needed to open a Bluetooth connection. 
     12%   COM_OpenNXT                - Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use 
     13%   COM_OpenNXTEx              - Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use 
     14%   COM_ReadI2C                - Requests and reads sensor data via I2C from a correctly configured digital sensor. 
     15%   COM_SendPacket             - Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port) 
     16%   COM_SetDefaultNXT          - Sets a global default NXT handle that will be used by other functions if no handle is specified. 
     17%   DebugMode                  - Gets or sets the debug state (i.e. if textOut will print messages to the command window) 
     18%   GetAccelerator             - Reads the current value of the HiTechnic acceleration sensor 
     19%   GetCompass                 - Reads the current value of the HiTechnic compass sensor 
     20%   GetInfrared                - Reads the current value of the Hitechnic infrared sensor (infrared seeker) 
     21%   GetLight                   - Reads the current value of the NXT light sensor 
     22%   GetMemoryCount             - Gets the internal NXT memory counter (manual mapping replica) 
     23%   GetMotor                   - Reads the current motor set by SetMotor(). Raises an error if no motor was set 
     24%   GetMotorSettings           - Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor 
     25%   GetSound                   - Reads the current value of the NXT sound sensor 
     26%   GetSwitch                  - Reads the current value of the NXT switch / touch sensor 
     27%   GetUltrasonic              - Reads the current value of the NXT ultrasonic sensor 
     28%   MAP_GetCommModule          - Reads the IO map of the communication module 
     29%   MAP_GetInputModule         - Reads the IO map of the input module 
     30%   MAP_GetOutputModule        - Reads the IO map of the output module 
     31%   MAP_GetSoundModule         - Reads the IO map of the sound module 
     32%   MAP_GetUIModule            - Reads the IO map of the user interface module 
     33%   MAP_SetOutputModule        - Writes the IO map to the output module 
     34%   MOTOR_A                    - Symbolic constant MOTOR_A (returns 0) 
     35%   MOTOR_B                    - Symbolic constant MOTOR_B (returns 1) 
     36%   MOTOR_C                    - Symbolic constant MOTOR_C (returns 2) 
     37%   MotorRotateAbs             - Rotates a motor to an absolute angle 
     38%   NXT_GetBatteryLevel        - Returns the current battery level in milli volts 
     39%   NXT_GetFirmwareVersion     - Returns the protocol and firmware version of the NXT 
     40%   NXT_GetInputValues         - Processes a complete sensor reading, i.e. requests input values and collects the answer. 
     41%   NXT_GetOutputState         - Requests and retrieves an output motor state reading 
     42%   NXT_LSGetStatus            - Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic) 
     43%   NXT_LSRead                 - Reads data from a low speed (digital) sensor 
     44%   NXT_LSWrite                - Writes the given data to a low speed (digital) sensor 
     45%   NXT_MessageWrite           - Sends a message to NXT 
     46%   NXT_PlaySoundFile          - Plays the given sound file on the NXT Brick 
     47%   NXT_PlayTone               - Plays a tone with the given frequency and duration  
     48%   NXT_ReadIOMap              - Reads the IO map of the given module ID 
     49%   NXT_ResetInputScaledValue  - Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode) 
     50%   NXT_ResetMotorPosition     - Resets NXT internal counter for specified motor, relative or absolute counter 
     51%   NXT_SendKeepAlive          - Sends a KeepAlive packet. Optional: requests sleep time limit. 
     52%   NXT_SetBrickName           - Sets a new name for the NXT Brick (connected to the specified handle) 
     53%   NXT_SetInputMode           - Sets mode, configures and initializes sensor ready to be read out 
     54%   NXT_SetOutputState         - Sends previously specified settings to current active motor. 
     55%   NXT_StartProgram           - Starts the given program on the NXT Brick 
     56%   NXT_StopProgram            - Stops a specific program on the NXT Brick 
     57%   NXT_StopSoundPlayback      - Stops the current sound playback 
     58%   NXT_WriteIOMap             - Writes the IO map to the given module ID 
     59%   OpenAccelerator            - Initializes and sets the mode of the HiTechnic acceleration sensor 
     60%   OpenCompass                - Initializes and sets the mode of the HiTechnic magnetic compass sensor 
     61%   OpenInfrared               - Initializes and sets the mode of the HiTechnic infrared seeker sensor 
     62%   OpenLight                  - Sets the parameter mode of the NXT light sensor 
     63%   OpenSound                  - Sets the parameter mode of the NXT sound sensor 
     64%   OpenSwitch                 - Sets the parameter mode of the NXT switch / touch sensor 
     65%   OpenUltrasonic             - Initializes and sets the mode of the NXT ultrasonic sensor 
     66%   OptimizeToolboxPerformance - Copies binary versions of typecastc to toolbox for better performance  
     67%   readFromIniFile            - Reads parameters from a configuration file (usually *.ini) 
     68%   ResetMotorAngle            - Resets the relative angle counter for the given motor 
     69%   SendMotorSettings          - Sends previously specified settings to current active motor. 
     70%   SENSOR_1                   - Symbolic constant SENSOR_1 (returns 0) 
     71%   SENSOR_2                   - Symbolic constant SENSOR_2 (returns 1) 
     72%   SENSOR_3                   - Symbolic constant SENSOR_3 (returns 2) 
     73%   SENSOR_4                   - Symbolic constant SENSOR_4 (returns 3) 
     74%   SetAngleLimit              - Sets the angle limit (in degrees) of the current motor port 
     75%   SetMemoryCount             - Sets the internal NXT memory counter (manual mapping replica) 
     76%   SetMotor                   - Sets the current motor to use for motor setting commands 
     77%   SetPower                   - Sets the power of the current active motor 
     78%   SetRampMode                - Sets the runstate of the current active motor 
     79%   SetTurnRatio               - Sets the turn ratio of the current active motor 
     80%   SpeedRegulation            - Enables / disables the speed regulation mode of the current active motor 
     81%   StopMotor                  - Stops / brakes specified motor. (Synchronisation will be lost after this) 
     82%   SwitchLamp                 - Switches the LEGO lamp on or off (has to be connected to a motor port) 
     83%   SyncToMotor                - Enables synchronization regulation for current active and specified motor 
     84%   textOut                    - Wrapper for fprintf() which can optionally write screen output to a logfile 
     85%   tictic                     - Similar to MATLAB's tic(), but extended to save "more states" 
     86%   toctoc                     - Similar to MATLAB's toc(), but extended to save "more states" 
     87%   USGetSnapshotResults       - Retrieves up to eight echos (distances) stored inside the US sensor 
     88%   USMakeSnapshot             - Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos 
     89%   WaitForMotor               - Pauses execution until specific motor is not running anymore.  
  • trunk/publishing/scripts/createCategories.py

    r305 r308  
    5353MAP_Functions = [] 
    5454General_Functions = [] 
     55General = ["OptimizeToolboxPerformance"] 
    5556 
    5657Sensor_Functions = [] 
     
    8384                                MAP_Functions.append(words) 
    8485                                 
    85                         elif command[0].islower(): 
     86                        elif command[0].islower() or command in General: 
    8687                                General_Functions.append(words) 
    8788                                 
  • trunk/publishing/scripts/create_documents.sh

    r210 r308  
    1818 
    1919 
     20# A  
    2021############################### 
    2122# start wg_publish_dir to create the html files 
    2223echo 
     24echo "--------------------------------------------------------------" 
    2325echo "Start MATLAB and startPublishing / wg_publish to create html files..." 
    2426matlab -nosplash -r "startPublishing()" 
     
    2628 
    2729 
     30# B 
    2831############################### 
    2932# remove style sheets from the html files and add header banner 
    3033echo 
     34echo "--------------------------------------------------------------" 
    3135echo "Remove styles sheets from the html files..."  
    3236mkdir $mfiles_dir/html_dir/new 
     
    3539# remove ; and || and %+ formats in the header description of each m-file 
    3640echo 
     41echo "--------------------------------------------------------------" 
    3742echo "Remove formats from the m-files..." 
    3843mkdir $mfiles_dir/m_dir $mfiles_dir/m_dir/private 
     
    4146 
    4247 
     48# C 
    4349############################### 
    4450# copy files from /doc/html/* to toolbox output directory 
     51echo 
     52echo "--------------------------------------------------------------" 
     53echo "Copy files from /doc and /doc/html to toolbox output directory" 
    4554mkdir $output_dir/doc 
    4655cp $doc_dir/* $output_dir/doc 
     
    5362 
    5463 
     64# D 
    5565############################### 
    5666# move m-files (without formats) to toolbox output directory 
    5767echo 
     68echo "--------------------------------------------------------------" 
    5869echo "Move m-files (without formats) to toolbox output directory..." 
    5970mv $mfiles_dir/m_dir/* $output_dir/ 
     
    6778 
    6879 
     80# E 
    6981############################### 
    7082# create function lists 
    7183echo  
     84echo "--------------------------------------------------------------" 
    7285echo "Create Functions - ABC List..." 
    7386python createABCList.py $mfiles_dir/Contents.m $output_dir/doc/functions 
     
    7891 
    7992 
     93# F 
    8094############################### 
    8195# create html from m-files in /doc/m2html/ --> doc/functions/ (e.g. Functions Overview etc.) 
    8296echo 
    83 echo "Create html files from /doc/m2html/*.m flies..." 
     97echo "--------------------------------------------------------------" 
     98echo "Create html files from /doc/m2html/*.m files..." 
    8499matlab -nosplash -r "publishM2HtmlFiles(); exit;" 
     100 
    85101 
    86102 
     
    88104# create html files from m-files in /demos/ --> doc/examples/ 
    89105echo 
     106echo "--------------------------------------------------------------" 
    90107echo "Create html files for examples/demos..." 
    91108matlab -nosplash -r "publishDemos(); exit;" 
     
    93110# copy demos 
    94111echo 
     112echo "--------------------------------------------------------------" 
    95113echo "Copy demos in toolbox output folder" 
    96114mkdir $output_dir/demos 
     
    98116 
    99117# create example index html 
     118echo 
     119echo "--------------------------------------------------------------" 
    100120echo "Create example index html..." 
    101 echo 
    102121python createExamples.py $output_dir/doc/examples $demos_dir/*.m 
    103122 
    104123 
    105124############################### 
    106 # create helpindex.xml 
     125 create helpindex.xml 
    107126echo 
     127echo "--------------------------------------------------------------" 
    108128echo "Create helpindex.xml ..." 
    109129python createHelpIndex.py $output_dir/doc/ $output_dir/doc/functions/help/*.html 
  • trunk/publishing/scripts/publishM2HtmlFiles.m

    r224 r308  
    1010 
    1111current_dir = pwd; 
    12 input_dir = strcat(current_dir, '../../doc/m2html'); 
    13 output_dir = strcat(current_dir, '../output/doc/functions'); 
     12input_dir = strcat(current_dir, '/../../doc/m2html'); 
     13output_dir = strcat(current_dir, '/../output/doc/functions'); 
    1414mkdir(output_dir); 
    1515options.outputDir = output_dir;