Fixed overlook device settings in config processing
This commit is contained in:
parent
c4a1cbcfb8
commit
ec6cb073ee
|
|
@ -133,14 +133,13 @@ int serialdev_free(SimDevice* this)
|
||||||
|
|
||||||
int serialdev_init(SerialDevice* serialdevice, DeviceSettings* ds)
|
int serialdev_init(SerialDevice* serialdevice, DeviceSettings* ds)
|
||||||
{
|
{
|
||||||
slogi("initializing serial device...");
|
slogi("initializing serial device on port %s...", ds->serialdevsettings.portdev);
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
|
||||||
serialdevice->motorsposition = ds->serialdevsettings.motorsposition;
|
serialdevice->motorsposition = ds->serialdevsettings.motorsposition;
|
||||||
serialdevice->baudrate = ds->serialdevsettings.baud;
|
serialdevice->baudrate = ds->serialdevsettings.baud;
|
||||||
|
|
||||||
error = arduino_init(serialdevice, ds->serialdevsettings.portdev);
|
|
||||||
switch (serialdevice->type)
|
switch (serialdevice->type)
|
||||||
{
|
{
|
||||||
case SERIALDEV_WHEEL:
|
case SERIALDEV_WHEEL:
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ int devsetup(const char* device_type, const char* device_subtype, const char* co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ds->dev_subtype == SIMDEVTYPE_SIMWIND || ds->dev_subtype == SIMDEVTYPE_SHIFTLIGHTS || ds->dev_subtype == SIMDEVTYPE_SERIALHAPTIC)
|
if (ds->dev_type == SIMDEV_SERIAL)
|
||||||
{
|
{
|
||||||
if (device_settings != NULL)
|
if (device_settings != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/shm.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
void display(char* prog, char* bytes, int n);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
const char* name = "acpmf_physics"; // file name
|
||||||
|
|
||||||
|
shm_unlink(name);
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue