User Tools

Site Tools


drc_hubo_creating_new_al_ap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
drc_hubo_creating_new_al_ap [2016/11/19 14:28] alvaropintadodrc_hubo_creating_new_al_ap [2016/11/19 14:52] (current) alvaropintado
Line 1: Line 1:
-==== Creating a new AL for HUBO ==== +====== Creating a New AL for HUBO ====== 
-----+**Author:** Alvaro Pintado    Email: [email protected] 
 +\\ 
 +**Date:** Last modified on 11/19/16 
 +\\ 
 +**Keywords:** Humanoid, HUBO, Software, PODO, AL Creation 
 +\\  
 +\\ 
  
 Follow this lengthy set of steps in order to kind of create  a new AL for HUBO. Follow this lengthy set of steps in order to kind of create  a new AL for HUBO.
Line 15: Line 22:
   - Add to Git version control   - Add to Git version control
   - Change AL Name to unique name    - Change AL Name to unique name 
-  - In main.cpp, declare an enum (must be >= 100)+  - In main.cpp, declare <code> 
 +    enum{ 
 +         enum [enum_identifier]; 
 +    }; </code>
   - In PODOGUI subproject, add new > Qt > Designer Form Class   - In PODOGUI subproject, add new > Qt > Designer Form Class
   - Select Dialog with Buttons   - Select Dialog with Buttons
   - Name everything the same as the AL to make your life simpler when debugging   - Name everything the same as the AL to make your life simpler when debugging
   - In the projectdialog.h, include CommonHeader.h   - In the projectdialog.h, include CommonHeader.h
-  - Declare a private int for enum commands+  - Under private: <code> 
 +    int [int_identifier]; </code>
   - In Dialog.cpp include PODOALDialog.h   - In Dialog.cpp include PODOALDialog.h
   - Declare the same enum in the dialog.cpp   - Declare the same enum in the dialog.cpp
-  - Set the dialog function, set the enum to = PODODialog::GetALNumFromFileName("ALName")+  - Set the dialog function <code> 
 +    [enum_identifier] = PODODialog::GetALNumFromFileName("ALName"</code>
   - In dialog.ui, make a button    - In dialog.ui, make a button 
   - In the QDialog menu, change the object name   - In the QDialog menu, change the object name
   - Right click the button and go to Slot, and select clicked() event   - Right click the button and go to Slot, and select clicked() event
-  - In dialog.cpp, in button function clicked() add +  - In dialog.cpp, in button function clicked() add <code> 
-    USER_COMMAND cmd; +    USER_COMMAND cmd; 
-    cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier]; +    cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier]; 
-    cmd.COMMAND_TARGET = [int_identifier]; +    cmd.COMMAND_TARGET = [int_identifier]; 
-    pLan->SendCommand(cmd);+    pLan->SendCommand(cmd); </code>
   - In PODOGUI sub-project, under GUIMainWindow.h and include dialog.h   - In PODOGUI sub-project, under GUIMainWindow.h and include dialog.h
-  - Under the //User Dialog section, make a pointer to the dialog class +  - Under the //User Dialog section//, make a pointer to the dialog class 
-  - In GUIMainWindow.cpp, under the section under //Expandable Dialogsadd +  - In GUIMainWindow.cpp, under the section under //Expandable Dialogs// add <code> 
-    ui->MAIN_TAB->addTab((QWidget*))dialogpointer, "tab name");+    ui->MAIN_TAB->addTab((QWidget*))dialogpointer, "tab name"); </code>
   - In the Ubuntu Software Center, download and install the SQL Database browser   - In the Ubuntu Software Center, download and install the SQL Database browser
   - Open it up and stuff and go to AL table > New Record   - Open it up and stuff and go to AL table > New Record
Line 50: Line 62:
   - Change to MOVE_RELATIVE   - Change to MOVE_RELATIVE
   - The line after is the "Don't Do Shit Anymore" command   - The line after is the "Don't Do Shit Anymore" command
-    - Santiago Ricoy+    - -//Santiago Ricoy//
   - Rebuild the project   - Rebuild the project
  
drc_hubo_creating_new_al_ap.txt · Last modified: 2016/11/19 14:52 by alvaropintado