Commit 8a2ec0f
authored
Line follower (DexterInd#276)
* Attempt at making easygopigo thread_safe
First, before each read, wait till the bus is available
Second, confirm the bus is open before doing the read (in case another thread got it)
Third, grab the read flag
Fourth do the read
Fifth, release the read flag asap for other threads
This only works for one process and only if all readings go through easygopigo
More than one process would still experience issues, but a single multi threaded process would be safe.
* Install line follower in a standard way.
To import use:
from line_follower import line_sensor
and it works!
* get rid of double self. One ego is enough
* Some phantom lines had reappeared. I must have goofed in Github again
* Change the way the IR Receiver behaves on GPG2.
By default, the behaviour is the same as before, but now we can have a "consume" stauts.
When 'consume' is set to False, the key is not erased and can be returned more than once.
* remove extra blank line
* Limit percent readings to 100. Mostly for sound and loudness sensors. We don't want to encourage classrooms into noise contests
* feature - assembly instructions for the GoPiGo2 (DexterInd#274)
feature - assembly instructions for the GoPiGo2
* Make the line follower returns all lowercase letters. Easier for string manipulation
Needed for DexterOS
* _is_read_open() is obsolete1 parent 959ff46 commit 8a2ec0f
File tree
3 files changed
+53
-49
lines changed- Software/Python
- ir_remote_control/server
- line_follower
3 files changed
+53
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
| 156 | + | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
355 | | - | |
356 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
| 559 | + | |
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
596 | | - | |
| 597 | + | |
597 | 598 | | |
| 599 | + | |
598 | 600 | | |
599 | 601 | | |
600 | 602 | | |
| |||
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
698 | | - | |
| 700 | + | |
699 | 701 | | |
700 | | - | |
| 702 | + | |
701 | 703 | | |
702 | 704 | | |
703 | | - | |
| 705 | + | |
704 | 706 | | |
705 | 707 | | |
706 | | - | |
| 708 | + | |
707 | 709 | | |
708 | | - | |
| 710 | + | |
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
| |||
716 | 718 | | |
717 | 719 | | |
718 | 720 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
| 721 | + | |
723 | 722 | | |
724 | 723 | | |
725 | | - | |
| 724 | + | |
726 | 725 | | |
727 | | - | |
| 726 | + | |
728 | 727 | | |
729 | | - | |
| 728 | + | |
730 | 729 | | |
731 | 730 | | |
732 | 731 | | |
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
| 735 | + | |
737 | 736 | | |
738 | 737 | | |
739 | 738 | | |
740 | 739 | | |
741 | 740 | | |
742 | 741 | | |
743 | | - | |
744 | | - | |
| 742 | + | |
| 743 | + | |
745 | 744 | | |
746 | 745 | | |
747 | 746 | | |
| |||
751 | 750 | | |
752 | 751 | | |
753 | 752 | | |
754 | | - | |
| 753 | + | |
755 | 754 | | |
756 | 755 | | |
757 | 756 | | |
758 | 757 | | |
759 | | - | |
| 758 | + | |
760 | 759 | | |
761 | 760 | | |
762 | 761 | | |
763 | 762 | | |
764 | 763 | | |
765 | 764 | | |
766 | | - | |
767 | | - | |
| 765 | + | |
| 766 | + | |
768 | 767 | | |
769 | 768 | | |
770 | | - | |
| 769 | + | |
771 | 770 | | |
772 | 771 | | |
773 | 772 | | |
| |||
791 | 790 | | |
792 | 791 | | |
793 | 792 | | |
794 | | - | |
| 793 | + | |
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
798 | | - | |
| 797 | + | |
799 | 798 | | |
800 | 799 | | |
801 | 800 | | |
802 | 801 | | |
803 | 802 | | |
804 | | - | |
805 | | - | |
| 803 | + | |
| 804 | + | |
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
| |||
814 | 813 | | |
815 | 814 | | |
816 | 815 | | |
817 | | - | |
| 816 | + | |
818 | 817 | | |
819 | 818 | | |
820 | 819 | | |
821 | 820 | | |
822 | 821 | | |
823 | 822 | | |
824 | | - | |
| 823 | + | |
825 | 824 | | |
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
829 | 828 | | |
830 | | - | |
| 829 | + | |
831 | 830 | | |
832 | | - | |
| 831 | + | |
833 | 832 | | |
834 | 833 | | |
835 | 834 | | |
836 | | - | |
| 835 | + | |
837 | 836 | | |
838 | 837 | | |
839 | 838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 | | |
128 | | - | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
0 commit comments