mirror of https://github.com/AxioDL/metaforce.git
CRumbleGenerator: Make use of fmt::print instead of printf
Less need to care about formatting specifiers.
This commit is contained in:
parent
8000fb9e42
commit
6fc32f44df
|
@ -24,8 +24,9 @@ void CRumbleGenerator::Update(float dt) {
|
||||||
if (!b_tp) {
|
if (!b_tp) {
|
||||||
b_tp = true;
|
b_tp = true;
|
||||||
s_tp = now;
|
s_tp = now;
|
||||||
} else
|
} else {
|
||||||
ms = std::chrono::duration_cast<std::chrono::milliseconds>(now - s_tp).count();
|
ms = std::chrono::duration_cast<std::chrono::milliseconds>(now - s_tp).count();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!xf0_24_disabled) {
|
if (!xf0_24_disabled) {
|
||||||
|
@ -38,7 +39,7 @@ void CRumbleGenerator::Update(float dt) {
|
||||||
if (xe0_commandArray[i] != EMotorState::Stop) {
|
if (xe0_commandArray[i] != EMotorState::Stop) {
|
||||||
#if PWM_MONITOR
|
#if PWM_MONITOR
|
||||||
s_tp = now;
|
s_tp = now;
|
||||||
printf("%lldms ON\n", ms);
|
fmt::print(FMT_STRING("{}ms ON\n"), ms);
|
||||||
#endif
|
#endif
|
||||||
xe0_commandArray[i] = EMotorState::Stop;
|
xe0_commandArray[i] = EMotorState::Stop;
|
||||||
updated = true;
|
updated = true;
|
||||||
|
@ -50,7 +51,7 @@ void CRumbleGenerator::Update(float dt) {
|
||||||
if (xe0_commandArray[i] != EMotorState::Rumble) {
|
if (xe0_commandArray[i] != EMotorState::Rumble) {
|
||||||
#if PWM_MONITOR
|
#if PWM_MONITOR
|
||||||
s_tp = now;
|
s_tp = now;
|
||||||
printf("%lldms Off\n", ms);
|
fmt::print(FMT_STRING("{}ms Off\n"), ms);
|
||||||
#endif
|
#endif
|
||||||
xe0_commandArray[i] = EMotorState::Rumble;
|
xe0_commandArray[i] = EMotorState::Rumble;
|
||||||
updated = true;
|
updated = true;
|
||||||
|
@ -62,7 +63,7 @@ void CRumbleGenerator::Update(float dt) {
|
||||||
if (xe0_commandArray[i] != EMotorState::Stop) {
|
if (xe0_commandArray[i] != EMotorState::Stop) {
|
||||||
#if PWM_MONITOR
|
#if PWM_MONITOR
|
||||||
s_tp = now;
|
s_tp = now;
|
||||||
printf("%lldms ON\n", ms);
|
fmt::print(FMT_STRING("{}ms ON\n"), ms);
|
||||||
#endif
|
#endif
|
||||||
xe0_commandArray[i] = EMotorState::Stop;
|
xe0_commandArray[i] = EMotorState::Stop;
|
||||||
updated = true;
|
updated = true;
|
||||||
|
|
Loading…
Reference in New Issue