#include "t89c51cc02.h"
#include "datatypes.h"
#include "adc.h"
#include "can.h"
#include "timer.h"
#include "sharp.h"
#include "fingersensors.h"
#include "photosensor.h"
#include "bumper.h"
#include "command.h"
#include "eeprom.h"
Go to the source code of this file.
Defines | |
#define | DEBUG 1 |
#define | LENGTH_SENSORBUFFER 128 |
#define | SAMPLEPOINTS 18 |
#define | BUFFER_LENGTH 6 * SAMPLEPOINTS |
#define | SERIALNUMBER 0x01 |
Functions | |
void | main () |
Variables | |
const char | version [] = "Sensor Control 07092007 #1" |
WORD xdata | sensorbuffer [BUFFER_LENGTH] |
circular buffer for sensor readings |
Definition in file main.c.
|
size of sensor backbuffer in WORDS Definition at line 34 of file main.c. Referenced by main(). |
|
Debug flag - enables additional debug output via CAN |
|
Maximum size of the external data memory in 16Bit Words |
|
combined number of samples taken per measurement point Definition at line 31 of file main.c. Referenced by main(). |
|
main serial number of the firmware Definition at line 37 of file main.c. Referenced by main(). |
|
Initializes all sensor subsystems and implements the main sensor reading cycle. Definition at line 53 of file main.c. References ADC_init(), BUFFER_LENGTH, Bumper_init(), Bumper_read(), BUMPERSENSORS_NR, can_data, CAN_enablechannel, CAN_init(), CAN_SendMsg(), CAN_setchannel, CH_DISABLE, CH_TxENA, CheckMonitor(), Command_ReadDefaultConfiguration(), Command_ReportDue(), Command_TimecheckEnable, fingersensors, Fingersensors_init(), FINGERSENSORS_NR, Fingersensors_read(), measurement_task, Photosensor_init(), Photosensor_PowerOff, Photosensor_read(), read_eeprom_config, readenable, reporting, SAMPLEPOINTS, sensorbuffer, SERIALNUMBER, Sharp_init(), Sharp_PowerOff, Sharp_PowerOn, Sharp_read(), and Timer_init(). |
|
circular buffer for sensor readings
We store all sequential sensor readings into this buffer. Definition at line 48 of file main.c. Referenced by main(). |
|
the version number encodes the current date in DDMMYYYY form and a revision number |