Skip to content

Commit a293522

Browse files
update READEME
1 parent 48dc4ab commit a293522

3 files changed

Lines changed: 114 additions & 3 deletions

File tree

.pvs

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[General]
2+
decode_signals=1
3+
meta_objs=0
4+
views=1
5+
6+
[D0]
7+
color=4279638298
8+
conv_options=0
9+
conversion_type=0
10+
enabled=true
11+
name=D0
12+
13+
[D1]
14+
color=4287582722
15+
conv_options=0
16+
conversion_type=0
17+
enabled=false
18+
name=D1
19+
20+
[D2]
21+
color=4291559424
22+
conv_options=0
23+
conversion_type=0
24+
enabled=false
25+
name=D2
26+
27+
[D3]
28+
color=4294277376
29+
conv_options=0
30+
conversion_type=0
31+
enabled=false
32+
name=D3
33+
34+
[D4]
35+
color=4293776384
36+
conv_options=0
37+
conversion_type=0
38+
enabled=false
39+
name=D4
40+
41+
[D5]
42+
color=4285780502
43+
conv_options=0
44+
conversion_type=0
45+
enabled=false
46+
name=D5
47+
48+
[D6]
49+
color=4281623972
50+
conv_options=0
51+
conversion_type=0
52+
enabled=false
53+
name=D6
54+
55+
[D7]
56+
color=4285878395
57+
conv_options=0
58+
conversion_type=0
59+
enabled=false
60+
name=D7
61+
62+
[decode_signal0]
63+
channel0\assigned_signal_name=D0
64+
channel0\initial_pin_state=2
65+
channel0\name=DIN
66+
channels=1
67+
color=4281510450
68+
conv_options=0
69+
conversion_type=0
70+
decoder0\ann_class0\visible=true
71+
decoder0\ann_class1\visible=true
72+
decoder0\ann_class2\visible=true
73+
decoder0\ann_class3\visible=true
74+
decoder0\id=dshot
75+
decoder0\option0\name=dshot_rate
76+
decoder0\option0\type=s
77+
decoder0\option0\value=@ByteArray(300\0)
78+
decoder0\options=1
79+
decoder0\row0\visible=true
80+
decoder0\row1\visible=true
81+
decoder0\row2\visible=true
82+
decoder0\visible=true
83+
decoders=1
84+
enabled=true
85+
name=DShot
86+
87+
[view0]
88+
D0\trace_height=38
89+
D1\trace_height=38
90+
D2\trace_height=38
91+
D3\trace_height=38
92+
D4\trace_height=38
93+
D5\trace_height=38
94+
D6\trace_height=38
95+
D7\trace_height=38
96+
offset=22 serialization::archive 18 0 0 0 0 6 41864914 88616679 44282928 75246844 9602798 0 0 0 6
97+
scale=2.3794634900977576e-05
98+
segment_display_mode=1
99+
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0L\0\0\x1\xfa\x1\0\0\0\x1\x1\0\0\0\x1\0)
100+
v_offset=-291
101+
zero_offset=22 serialization::archive 18 0 0 0 0 0 0 0 0 0 0 0 0 0 6

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
# sigrok-decoder-dshot
1+
# sigrok-decoder-dshot
2+
3+
# Usage
4+
## Debian
5+
mkdir ~/.local/share/libsigrokdecode/decoders
6+
7+
cd ~/.local/share/libsigrokdecode/decoders
8+
9+
Then clone this repository
10+
11+
Reload sigrok-cli/pulseview

pd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def reset(self):
8080
def start(self):
8181
self.bidirectional = True if self.options['bidir'] == 'True' else False
8282
self.dshot_period = self.dshot_period_lookup[self.options['dshot_rate']]
83-
print("start period",self.dshot_period)
83+
#print("start period",self.dshot_period)
8484
self.out_ann = self.register(srd.OUTPUT_ANN)
8585

8686
def metadata(self, key, value):
@@ -90,7 +90,7 @@ def metadata(self, key, value):
9090
def handle_bits(self, samplenum):
9191
if len(self.bits) == 16:
9292
# rgb = (grb & 0xff0000) >> 8 | (grb & 0x00ff00) << 8 | (grb & 0x0000ff)
93-
print(self.bits)
93+
#print(self.bits)
9494
throttle = int(reduce(lambda a, b: (a << 1) | b, self.bits[:11]))
9595
self.put(self.ss_packet, samplenum, self.out_ann,
9696
[2, ['%04d' % throttle]])

0 commit comments

Comments
 (0)