Hardware manual

91
int Form1::openDevice () [private]
Open given device.
Function opens device given in deviceLineEdit1 text line and assigns the fd pointer.
Returns:
0 if there were no errors.
int Form1::closeDevice () [private]
Close opened device.
Function closes device pointed by the fd descriptor.
Returns:
0 if there were no errors.
int Form1::generatePhaseTables () [private]
Generates phase tables.
Function generates phase tables. It read phaseTableLen and then fill in the arrays pointed by ph1 ,
ph2 and ph3 pointers.
Returns:
0 if there were no errors.
int Form1::detection (short pos_pha[], short * nr_of_pha, unsigned short hal_tab[]) [private]
Provides detection of hall sensors and index mark.
Detects the order of hall sensor table and position of index mark. It can use phase tables generated by
the HalDetector or it can use phase tables already uploaded to microcontroller.
Parameters:
pos_pha pointer to table were the positions of index mark should be stored.
nr_of_pha pointer to variable where the number of index mark crossing should be stored/
hal_tab pointer to hall table.
Returns:
0 - there were no errors.
-1 - there was an error during writting to device
-2 - there was an error during reading from device.
The documentation for this class was generated from the following files:
/home/users/argon/Programmieren/KDevelop/Projects/HalDetector/src/haldetector.h
/home/users/argon/Programmieren/KDevelop/Projects/HalDetector/src/haldetector.cpp