constants.py 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. # Display Modes (p89)
  2. modes = {
  3. "rotate": "a",
  4. "hold": "b",
  5. "flash": "c",
  6. "roll_up": "e",
  7. "roll_down": "f",
  8. "roll_left": "g",
  9. "roll_right": "h",
  10. "wipe_up": "i",
  11. "wipe_down": "j",
  12. "wipe_left": "k",
  13. "wipe_right": "l",
  14. "scroll": "m",
  15. "automode": "o",
  16. "roll_in": "p",
  17. "roll_out": "q",
  18. "wipe_in": "r",
  19. "wipe_out": "s",
  20. "compressed_rotate": "t", # only available on certain sign models
  21. "explode": "u", # alpha 3.0 protocol
  22. "clock": "v", # alpha 3.0 protocol
  23. # Special Modes
  24. "twinkle": "n0",
  25. "sparkle": "n1",
  26. "snow": "n2",
  27. "interlock": "n3",
  28. "switch": "n4",
  29. "slide": "n5", # only Betabrite 1036 (same as CYCLE_COLORS?)
  30. "spray": "n6",
  31. "starburst": "n7",
  32. "welcome": "n8",
  33. "slot_machine": "n9",
  34. "news_flash": "nA", # only Betabrite 1036
  35. "trumpet_animation": "nb", # only betabrite 1036
  36. "cycle_colors": "nC", # only AlphaEclipse 3600
  37. # Special Graphics (these display before the message)
  38. "thank_you": "nS",
  39. "no_smoking": "nU",
  40. "dont_drive_drive": "nV",
  41. "running_animal": "nW",
  42. "fish_animation": "nW",
  43. "fireworks": "nX",
  44. "turbo_car": "nY",
  45. "balloon_animation": "nY",
  46. "cherry_bomb": "nZ",
  47. }
  48. # Display Positions
  49. positions = {
  50. "middle_line": "\x20",
  51. "top_line": "\x22",
  52. "bottom_line": "\x26",
  53. "fill": "\x30",
  54. "left": "\x31",
  55. "right": "\x32",
  56. }
  57. # Character Sets
  58. charsets = {
  59. "five_high_std": "1",
  60. "five_stroke": "2",
  61. "seven_high_std": "3",
  62. "seven_stroke": "4",
  63. "seven_high_fancy": "5",
  64. "ten_high_std": "6",
  65. "seven_shadow": "7",
  66. "full_height_fancy": "8",
  67. "full_height_std": "9",
  68. "seven_shadow_fancy": ":",
  69. "five_wide": ";",
  70. "seven_wide": "<",
  71. "seven_fancy_wide": "=",
  72. "wide_stroke_five": ">",
  73. # The following four only work on Alpha 2.0 and Alpha 3.0 protocols
  74. "five_high_cust": "W",
  75. "seven_high_cust": "X",
  76. "ten_high_cust": "Y",
  77. "fifteen_high_cust": "Z",
  78. }
  79. # Extended characters
  80. extchars = {
  81. "up_arrow": "\x64",
  82. "down_arrow": "\x65",
  83. "left_arrow": "\x66",
  84. "right_arrow": "\x67",
  85. "pacman": "\x68",
  86. "sail_boat": "\x69",
  87. "ball": "\x6A",
  88. "telephone": "\x6B",
  89. "heart": "\x6C",
  90. "car": "\x6D",
  91. "handicap": "\x6E",
  92. "rhino": "\x6F",
  93. "mug": "\x70",
  94. "satellite_dish": "\x71",
  95. "copyright_symbol": "\x72",
  96. "male_symbol": "\x73",
  97. "female_symbol": "\x74",
  98. "bottle": "\x75",
  99. "diskette": "\x76",
  100. "printer": "\x77",
  101. "musical_note": "\x78",
  102. "infinity_symbol": "\x79",
  103. }
  104. # Counters
  105. # We have 5 of them.
  106. counters = {
  107. 1: "z",
  108. 2: "{",
  109. 3: "|",
  110. 4: "}",
  111. 5: "-",
  112. }
  113. # Colors
  114. colors = {
  115. "red": "1",
  116. "green": "2",
  117. "amber": "3",
  118. "dim_red": "4",
  119. "dim_green": "5",
  120. "brown": "6",
  121. "orange": "7",
  122. "yellow": "8",
  123. "rainbow_1": "9",
  124. "rainbow_2": "A",
  125. "color_mix": "B",
  126. "autocolor": "C",
  127. }
  128. # Command Codes
  129. WRITE_TEXT = "A" # Write TEXT file (p18)
  130. READ_TEXT = "B" # Read TEXT file (p19)
  131. WRITE_SPECIAL = "E" # Write SPECIAL FUNCTION commands (p21)
  132. READ_SPECIAL = "F" # Read SPECIAL FUNCTION commands (p29)
  133. WRITE_STRING = "G" # Write STRING (p37)
  134. READ_STRING = "H" # Read STRING (p38)
  135. WRITE_SMALL_DOTS = "I" # Write SMALL DOTS PICTURE file (p39)
  136. READ_SMALL_DOTS = "J" # Read SMALL DOTS PICTURE file (p41)
  137. WRITE_RGB_DOTS = "K" # Write RGB DOTS PICTURE file (p44)
  138. READ_RGB_DOTS = "L" # Read RGB DOTS PICTURE file (p46)
  139. WRITE_LARGE_DOTS = "M" # Write LARGE DOTS PICTURE file (p42)
  140. READ_LARGE_DOTS = "N" # Read LARGE DOTS PICTURE file (p43)
  141. WRITE_ALPHAVISION = "O" # Write ALPHAVISION BULLETIN (p48)
  142. SET_TIMEOUT = "T" # Set Timeout Message (p118) (Alpha 2.0/3.0)
  143. # Constants used in transmission packets
  144. NUL = "\x00" # NULL
  145. SOH = "\x01" # Start of Header
  146. STX = "\x02" # Start of TeXt (precedes a command code)
  147. ETX = "\x03" # End of TeXt
  148. EOT = "\x04" # End Of Transmission
  149. #ENQ = "\x05" # Enquiry
  150. #ACK = "\x06" # Acknowledge
  151. BEL = "\x07" # Bell
  152. BS = "\x08" # Backspace
  153. HT = "\x09" # Horizontal tab
  154. LF = "\x0A" # Line Feed
  155. NL = "\x0A" # New Line
  156. VT = "\x0B" # Vertical Tab
  157. #FF = "\x0C" # Form Feed
  158. #NP = "\x0C" # New Page
  159. CR = "\x0D" # Carriage Return
  160. CAN = "\x18" # Cancel
  161. SUB = "\x1A" # Substitute (select charset)
  162. ESC = "\x1B" # Escape character