-
-
Save LuckyResistor/57af62aeeee54990b0c0be2ee3dde660 to your computer and use it in GitHub Desktop.
Compressed Example for a Simple Wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LevelMeter.h: | |
#pragma once | |
#include <cstdint> | |
namespace lr { | |
namespace LevelMeter { | |
uint8_t getValue(); | |
} | |
} | |
// LevelMeter.cpp | |
#include "LevelMeter.h" // first! | |
#include "haxor_lvl_mtrV9.h" // bad code... :-P | |
namespace lr { | |
namespace LevelMeter { | |
uint8_t getValue() | |
{ | |
struct LVL_METER_VALUE value; | |
auto result = haxor_level_mrt_get_value(&value, nullptr, nullptr, nullptr, 1, 8, 9, nullptr); | |
if (result != 1) { | |
return 0; | |
} else { | |
return value.z.value.w; | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment