diff --git a/fsw/platform_inc/tvs_io_platform_cfg.h b/fsw/platform_inc/tvs_io_platform_cfg.h index f62a442..8511ef3 100644 --- a/fsw/platform_inc/tvs_io_platform_cfg.h +++ b/fsw/platform_inc/tvs_io_platform_cfg.h @@ -51,6 +51,13 @@ static const int TVS_SERVER_PORTS[TVS_NUM_SIM_CONN] = {17000, 17001}; #define TVS_IO_FRAME_DATA_BUFFER_SIZE 81920 // 80 kB default - can be tuned up or down based on data rate per frame +/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ +/* Caution: The byte swap implementation below is expermental! */ +/* This will only byte swap data coming FROM trick (flowDirection 1) */ +#define TVS_BYTE_SWAP false // Set to true to byte swap, use at your own risk +#define TVS_SET_BYTE_SWAP_CMD "trick.var_byteswap(1)\n" +/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ + #endif /* _TVS_IO_PLATFORM_CFG_H_ */ /*======================================================================================= diff --git a/fsw/src/tvs_io_app.c b/fsw/src/tvs_io_app.c index 8a87687..f9efdf0 100644 --- a/fsw/src/tvs_io_app.c +++ b/fsw/src/tvs_io_app.c @@ -195,6 +195,10 @@ int32 SendInitMessages() { SendTvsMessage(conn, TVS_PAUSE_CMD); SendTvsMessage(conn, TVS_SET_BINARY_NO_NAMES); + #if(TVS_BYTE_SWAP) // Caution! Experimental, use at your own risk! + // trick variable server will byte swap data before sending to tvsio, enable in tvs_io_platform_cfg.h + SendTvsMessage(conn, TVS_SET_BYTE_SWAP_CMD); + #endif SendTvsMessage(conn, TVS_SET_COPY_MODE_CMD); SendTvsMessage(conn, TVS_SET_WRITE_MODE_CMD); }