Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
14b64e2b
Commit
14b64e2b
authored
Apr 30, 2015
by
Jeroen Vreeken
Browse files
Small fixes in vesp code.
parent
11523659
Changes
2
Show whitespace changes
Inline
Side-by-side
controller/vesp/block_vesp_sensor_co.c
View file @
14b64e2b
...
...
@@ -58,6 +58,8 @@ struct tx_packet {
#define VESP_SENSOR_CO_CMD_CONTROL 4
#define VESP_SENSOR_CO_CTRL_ENABLE 1
#define VESP_SENSOR_CO_CTRL_RAW 2
static
void
calculate
(
struct
controller_block
*
sensor
)
{
...
...
@@ -66,9 +68,10 @@ static void calculate(struct controller_block *sensor)
struct
tx_packet
*
packet_tx
=
priv
->
data_tx
;
/* no calibration yet, just a direct conversion */
priv
->
ppm
=
l
e16toh
(
packet_rx
->
vdiv
);
priv
->
ppm
=
b
e16toh
(
packet_rx
->
vdiv
);
packet_tx
->
control
=
VESP_SENSOR_CO_CTRL_ENABLE
;
packet_tx
->
control
=
VESP_SENSOR_CO_CTRL_ENABLE
|
VESP_SENSOR_CO_CTRL_RAW
;
}
static
void
rx_callback
(
struct
controller_block
*
block
,
void
*
data
)
...
...
controller/vesp/block_vesp_tty.c
View file @
14b64e2b
...
...
@@ -234,6 +234,7 @@ static int vesp_dev_open(struct controller_block *block)
goto
err
;
}
#if defined(__linux__)
struct
serial_rs485
rs485conf
=
{
0
};
...
...
@@ -267,6 +268,7 @@ static int vesp_dev_open(struct controller_block *block)
log_send
(
LOG_T_WARNING
,
"%s: ioctl(TIOCSRS485): %s"
,
block
->
name
,
strerror
(
errno
));
}
#endif
log_send
(
LOG_T_INFO
,
"%s: Opened %s"
,
block
->
name
,
priv
->
devname
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment