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 ); + } }