From c78f695c31e4d8f3f09cef442264b6dc4884c00d Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 27 Jun 2023 17:27:58 -0400 Subject: [PATCH] cwVelTableTuner.h/cpp : Added get_vel_table(). --- cwVelTableTuner.cpp | 20 ++++++++++++++++++++ cwVelTableTuner.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/cwVelTableTuner.cpp b/cwVelTableTuner.cpp index 9bb3e30..950c1d9 100644 --- a/cwVelTableTuner.cpp +++ b/cwVelTableTuner.cpp @@ -1110,3 +1110,23 @@ cw::rc_t cw::vtbl::exec( handle_t h ) } return rc; } + +const uint8_t* cw::vtbl::get_vel_table( handle_t h, const char* label, unsigned& velTblN_Ref ) +{ + vtbl_t* p = _handleToPtr(h); + + const tbl_t* t= nullptr; + + velTblN_Ref = 0; + + if((t = _table_from_name( p, label )) == nullptr ) + { + cwLogError(kInvalidArgRC,"The velocity table named:'%s' could not be found.",cwStringNullGuard(label)); + return nullptr; + } + + velTblN_Ref = t->tableN; + + return t->tableA; + +} diff --git a/cwVelTableTuner.h b/cwVelTableTuner.h index cac3427..9cfb9eb 100644 --- a/cwVelTableTuner.h +++ b/cwVelTableTuner.h @@ -80,5 +80,8 @@ namespace cw // Update the state of the player rc_t exec( handle_t h ); + + const uint8_t* get_vel_table( handle_t h, const char* label, unsigned& velTblN_Ref ); + } }