diff --git a/src/monocoque/devices/serialdevice.c b/src/monocoque/devices/serialdevice.c index d2aaa10..5d943c0 100644 --- a/src/monocoque/devices/serialdevice.c +++ b/src/monocoque/devices/serialdevice.c @@ -133,14 +133,13 @@ int serialdev_free(SimDevice* this) int serialdev_init(SerialDevice* serialdevice, DeviceSettings* ds) { - slogi("initializing serial device..."); + slogi("initializing serial device on port %s...", ds->serialdevsettings.portdev); int error = 0; serialdevice->motorsposition = ds->serialdevsettings.motorsposition; serialdevice->baudrate = ds->serialdevsettings.baud; - error = arduino_init(serialdevice, ds->serialdevsettings.portdev); switch (serialdevice->type) { case SERIALDEV_WHEEL: diff --git a/src/monocoque/helper/confighelper.c b/src/monocoque/helper/confighelper.c index 22122dd..06faa29 100644 --- a/src/monocoque/helper/confighelper.c +++ b/src/monocoque/helper/confighelper.c @@ -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) { diff --git a/tests/a.out b/tests/a.out new file mode 100755 index 0000000..209cdd7 Binary files /dev/null and b/tests/a.out differ diff --git a/tests/producer b/tests/producer new file mode 100755 index 0000000..60b37bc Binary files /dev/null and b/tests/producer differ diff --git a/tests/sharedmemoryunlink.c b/tests/sharedmemoryunlink.c new file mode 100644 index 0000000..71441b6 --- /dev/null +++ b/tests/sharedmemoryunlink.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void display(char* prog, char* bytes, int n); + +int main(void) +{ + const char* name = "acpmf_physics"; // file name + + shm_unlink(name); +} +