forked from hoantv/VNWheel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.cpp
107 lines (90 loc) · 2.54 KB
/
debug.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "debug.h"
void ReportPrint(volatile TEffectState &effect) {
Serial.print("state: ");
Serial.println(effect.state);
Serial.print("effectType: ");
switch (effect.effectType)
{ case 1:
Serial.println("USB_EFFECT_CONSTANT");
break;
case 2:
Serial.println("USB_EFFECT_RAMP");
break;
case 3:
Serial.println("USB_EFFECT_SQUARE");
break;
case 4:
Serial.println("USB_EFFECT_SINE");
break;
case 5:
Serial.println("USB_EFFECT_TRIANGLE");
break;
case 6:
Serial.println("USB_EFFECT_SAWTOOTHDOWN");
break;
case 7:
Serial.println("USB_EFFECT_SAWTOOTHUP");
break;
case 8:
Serial.println("USB_EFFECT_SPRING");
break;
case 9:
Serial.println("USB_EFFECT_DAMPER");
break;
case 10:
Serial.println("USB_EFFECT_INERTIA");
break;
case 11:
Serial.println("USB_EFFECT_FRICTION");
break;
case 12:
Serial.println("USB_EFFECT_CUSTOM");
break;
default:
break;
}
Serial.print("offset: ");
Serial.println(effect.offset);
Serial.print("gain: ");
Serial.println(effect.gain);
Serial.print("attackLevel: ");
Serial.println(effect.attackLevel);
Serial.print("fadeLevel: ");
Serial.println(effect.fadeLevel);
Serial.print("magnitude: ");
Serial.println(effect.magnitude);
Serial.print("enableAxis: ");
Serial.println(effect.enableAxis);
Serial.print("directionX: ");
Serial.println(effect.directionX);
Serial.print("directionY: ");
Serial.println(effect.directionY);
Serial.print("cpOffset: ");
Serial.println(effect.cpOffset);
Serial.print("positiveCoefficient: ");
Serial.println(effect.positiveCoefficient);
Serial.print("negativeCoefficient: ");
Serial.println(effect.negativeCoefficient);
Serial.print("positiveSaturation: ");
Serial.println(effect.positiveSaturation);
Serial.print("negativeSaturation: ");
Serial.println(effect.negativeSaturation);
Serial.print("deadBand: ");
Serial.println(effect.deadBand);
Serial.print("phase: ");
Serial.println(effect.phase);
Serial.print("start: ");
Serial.println(effect.startMagnitude);
Serial.print("end: ");
Serial.println(effect.endMagnitude);
Serial.print("period: ");
Serial.println(effect.period);
Serial.print("duration: ");
Serial.println(effect.duration);
Serial.print("fadeTime: ");
Serial.println(effect.fadeTime);
Serial.print("attackTime: ");
Serial.println(effect.attackTime);
Serial.print("elapsedTime: ");
Serial.println(effect.elapsedTime);
}