rc433/rc433.h

Sat, 16 May 2015 17:39:30 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 16 May 2015 17:39:30 +0200
changeset 362
c92651a54969
parent 60
dc3d953a218f
permissions
-rw-r--r--

Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0

51
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
1 #ifndef _RC433_H
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
2 #define _RC433_H
20
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #define TRUE 1
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 #define FALSE 0
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6
51
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
7 #include "../config.h"
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
8
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
9 #include <stdlib.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
10 #include <stdio.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
11 #include <stdint.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
12 #include <stdarg.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
13 #include <string.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
14 #include <ctype.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
15 #include <sys/types.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
16 #include <stdbool.h>
60
dc3d953a218f Code fix
Michiel Broek <mbroek@mbse.eu>
parents: 58
diff changeset
17 #include <getopt.h>
51
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
18
58
e8e7b46b705b Fixed compilation without wiringpi
Michiel Broek <mbroek@mbse.eu>
parents: 51
diff changeset
19 #ifdef HAVE_WIRINGPI_H
51
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
20
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
21 /* wiringPi */
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
22 #include <wiringPi.h>
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
23
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
24
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
25 /* rc-switch.c */
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
26 int toggleSwitch(char *);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
27 int toggleTypeA(char *, char *, bool);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
28 int toggleTypeB(int, int, bool);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
29 int toggleTypeC(char, int, int, bool);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
30 int toggleTypeE(char, int, bool);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
31
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
32 void enableReceiveIRQ(int interrupt);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
33 void enableReceive(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
34 void disableReceive(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
35 bool available(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
36 void resetAvailable(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
37
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
38 unsigned long getReceivedValue(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
39 unsigned int getReceivedBitlength(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
40 unsigned int getReceivedDelay(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
41 unsigned int getReceivedProtocol(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
42 unsigned int *getReceivedRawdata(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
43
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
44 void enableTransmit(int);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
45 void disableTransmit(void);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
46
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
47 char *dec2binWzerofill(unsigned long, unsigned int);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
48
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
49
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
50 /* xutil.c */
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
51 char *xmalloc(size_t);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
52 char *xstrcpy(char *);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
53 char *xstrcat(char *, char *);
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
54
58
e8e7b46b705b Fixed compilation without wiringpi
Michiel Broek <mbroek@mbse.eu>
parents: 51
diff changeset
55 #endif
e8e7b46b705b Fixed compilation without wiringpi
Michiel Broek <mbroek@mbse.eu>
parents: 51
diff changeset
56
20
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57
f7f9463cdefd Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58 #endif

mercurial