@@ -663,10 +663,7 @@ def decimal_on_single(self, display_number):
663663 :param display_number: the number of display to turn the decimal on for.
664664 :return: true if decimal is successfully turned on, false otherwise.
665665 :rtype: bool
666- """
667- # Debug
668- print ("\n I'm in decimal_on_single" )
669-
666+ """
670667 return self .set_decimal_on_off (display_number , True )
671668
672669 # ---------------------------------------------------------------------------------
@@ -764,9 +761,6 @@ def colon_on_single(self, display_number):
764761 :return: true if display updated successfully, false otherwise.
765762 :rtype: bool
766763 """
767- # Debug
768- print ("\n I'm in colon_on_single" )
769-
770764 return self .set_colon_on_off (display_number , True )
771765
772766 # ---------------------------------------------------------------------------------
@@ -869,10 +863,6 @@ def illuminate_segment(self, segment, digit):
869863 segment = ord (segment )
870864 com = segment - ord ('A' ) # Convert the segment letter back to a number
871865
872- # Debug
873- #print("\nThis is com: ")
874- #print(com)
875-
876866 if com > 6 :
877867 com = com - 7
878868 # Special cases in which the segment order is a lil switched.
@@ -881,37 +871,17 @@ def illuminate_segment(self, segment, digit):
881871 if segment == ord ('H' ):
882872 com = 1
883873
884- # Debug
885- #print("\nThis is re-calculated com: ")
886- #print(com)
887-
888874 row = digit % 4 # Convert digit (1 to 16) back to a relative position on a given
889875 # digit on a display
890876 if segment > ord ('G' ):
891- # DEbug
892- #print("\nI'm bigger than seg G!")
893877 row = row + 4
894878
895- # DEBUG
896- #print("\nTHis is row: ")
897- #print(row)
898-
899879 offset = int (digit / 4 ) * 16
900- # DEBUG: testing
901880 adr = com * 2 + offset
902- #adr = com * 2
903-
904- # debug:
905- #print("\nThis is offset: ")
906- #print(offset)
907- #print("\nTHis is adr: ")
908- #print(adr)
909881
910882 # Determine the address
911883 if row > 7 :
912884 adr = adr + 1
913- # Debug
914- #print("\nROW BIGGER THAN 7!")
915885
916886 # Determine the data bit
917887 if row > 7 :
@@ -989,14 +959,8 @@ def print(self, print_string):
989959 :return: true if update_display() is successful, false otherwise
990960 :rtype: bool
991961 """
992- # Debug
993- print ("this is print_string: " )
994- print (print_string )
995-
962+ # Clear the display_RAM array
996963 self .clear ()
997- # # Clear the display_RAM array
998- # for i in range(0, 16 * self.number_of_displays):
999- # self.display_RAM[i] = 0
1000964
1001965 self .digit_position = 0
1002966
@@ -1027,10 +991,6 @@ def update_display(self):
1027991 :return: true if displays are updated successfully, false otherwise.
1028992 :rtype: bool
1029993 """
1030- # Debug
1031- print ("\n This is display_RAM: " )
1032- print (self .display_RAM )
1033-
1034994 status = True
1035995
1036996 for i in range (1 , self .number_of_displays + 1 ):
@@ -1052,10 +1012,6 @@ def shift_right(self, shift_amt = 1):
10521012 :return: true if display updates successfully, false otherwise.
10531013 :rtype: bool
10541014 """
1055- # Debug
1056- print ("\n This is display_content before shift: " )
1057- print (self .display_content )
1058-
10591015 for x in range ((4 * self .number_of_displays ) - shift_amt , shift_amt - 1 , - 1 ):
10601016 self .display_content [x ] = self .display_content [x - shift_amt ]
10611017
@@ -1071,12 +1027,6 @@ def shift_right(self, shift_amt = 1):
10711027 for x in range (0 , len (self .display_content )):
10721028 if self .display_content [x ] != '\x00 ' :
10731029 temp += self .display_content [x ]
1074-
1075- # Debug
1076- print ("\n This is display_content: " )
1077- print (self .display_content )
1078- print ("\n This is temp: " )
1079- print (temp )
10801030
10811031 self .print (temp )
10821032
@@ -1110,12 +1060,6 @@ def shift_left(self, shift_amt = 1):
11101060 if self .display_content [x ] != '\x00 ' :
11111061 temp += self .display_content [x ]
11121062
1113- # Debug
1114- print ("\n This is display_content: " )
1115- print (self .display_content )
1116- print ("\n This is temp: " )
1117- print (temp )
1118-
11191063 self .print (temp )
11201064
11211065 # ---------------------------------------------------------------------------------
@@ -1139,10 +1083,9 @@ def write_RAM(self, address, reg, buff):
11391083 display_num = 3
11401084 elif address == self ._device_address_display_four :
11411085 display_num = 4
1142- # TODO: not sure if this needs to be here or any of the lines above...
1086+
11431087 self .is_connected (display_num )
11441088
1145- # TODO: need to convert buff into list of bytes
11461089 self ._i2c .writeBlock (address , reg , buff )
11471090
11481091 def write_RAM_byte (self , address , data_to_write ):
0 commit comments