Skip to content

Commit

Permalink
Merge branch 'EspoTek:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mmehari authored Jun 22, 2024
2 parents 752b488 + 10484cc commit 7b79da5
Show file tree
Hide file tree
Showing 64 changed files with 2,831 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Librador_API/___librador/librador_shared_library/librador.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "usbcallhandler.h"
#include "logging_internal.h"

#define _USE_MATH_DEFINES

#include <vector>
#include <math.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#else
#ifdef _WIN32 | _WIN64
#define Q_DECL_EXPORT __declspec(dllexport)
#define Q_DECL_IMPORT __declspec(dllimport)
#define Q_DECL_IMPORT
#else
#define Q_DECL_EXPORT
#define Q_DECL_IMPORT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@

#include "logging.h"

#define LIBRADOR_LOG(level, ...) \
do { \
librador_global_logger(level, __VA_ARGS__); \
} while (0)
#ifdef LIBRADOR_ENABLE_LOGGING
#define LIBRADOR_LOG(level, ...) \
do \
{ \
librador_global_logger(level, __VA_ARGS__); \
} while (0)
#else
#define LIBRADOR_LOG(level, ...) \
do \
{ \
/* Logging is disabled */ \
} while (0)
#endif // LIBRADOR_DISABLE_LOGGING

void librador_global_logger(const int level, const char * format, ...);
void librador_global_logger(const int level, const char* format, ...);

#endif // LOGGING_INTERNAL_H
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ double o1buffer::sampleConvert(int sample, double scope_gain, bool AC, bool twel
}

if(twelve_bit_multimeter){
#warning Hack here. Do not know why this line works, but it does.
#pragma message("Hack here.Do not know why this line works, but it does.")
voltageLevel = voltageLevel / 16;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int usbCallHandler::setup_usb_control(){
LIBRADOR_LOG(LOG_ERROR, "libusb_init FAILED\n");
return -1;
} else LIBRADOR_LOG(LOG_DEBUG, "Libusb context initialised\n");
libusb_set_debug(ctx, 3);
//libusb_set_debug(ctx, 3);

//Get a handle on the Labrador device
handle = libusb_open_device_with_vid_pid(ctx, VID, PID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ typedef struct fGenSettings{
return temp_control_transfer_error_value - 1000; \
}


class usbCallHandler
{
public:
Expand Down
Loading

0 comments on commit 7b79da5

Please sign in to comment.