26#ifndef PART_HCSR0404_H
27#define PART_HCSR0404_H
29#include "../lib/part.h"
31#define PART_HCSR0404_Name "Ultrasonic HC-SR04"
35 std::string
GetAboutInfo(
void)
override {
return "L.C. Gamboa \n <lcgamboa@yahoo.com>"; };
36 cpart_hcsr04(
const unsigned x,
const unsigned y,
const char* name,
const char* type,
board* pboard_,
const int id_);
38 void DrawOutput(
const unsigned int index)
override;
40 void OnMouseButtonPress(
unsigned int inputId,
unsigned int button,
unsigned int x,
unsigned int y,
41 unsigned int state)
override;
42 void OnMouseButtonRelease(
unsigned int inputId,
unsigned int button,
unsigned int x,
unsigned int y,
43 unsigned int state)
override;
44 void OnMouseMove(
unsigned int inputId,
unsigned int button,
unsigned int x,
unsigned int y,
45 unsigned int state)
override;
50 unsigned short GetInputId(
char* name)
override;
55 unsigned char pins[2];
60 unsigned char old_value;
Board class.
Definition board.h:111
Definition input_hcsr04.h:33
void ReadPropertiesWindow(void) override
Called when properties window close.
Definition input_hcsr04.cc:231
void Process(void) override
Called every CPU step.
Definition input_hcsr04.cc:117
unsigned short GetInputId(char *name) override
return the input ids numbers of names used in input map
Definition input_hcsr04.cc:188
void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event handler on the part.
Definition input_hcsr04.cc:161
void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event handler on the part.
Definition input_hcsr04.cc:171
void RegisterRemoteControl(void) override
Register remote control variables.
Definition input_hcsr04.cc:64
void ConfigurePropertiesWindow(void) override
Called to configure the properties window.
Definition input_hcsr04.cc:226
std::string WritePreferences(void) override
Called to save part preferences in configuration file.
Definition input_hcsr04.cc:214
void ReadPreferences(std::string value) override
Called whe configuration file load preferences.
Definition input_hcsr04.cc:222
std::string GetAboutInfo(void) override
Return the about information of part.
Definition input_hcsr04.h:35
void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event handler on the part.
Definition input_hcsr04.cc:148
unsigned short GetOutputId(char *name) override
return the output ids numbers of names used in output map
Definition input_hcsr04.cc:196
void DrawOutput(const unsigned int index) override
Called to draw every output.
Definition input_hcsr04.cc:75
PART class.
Definition part.h:49