diff --git a/tivars/types/gdb.py b/tivars/types/gdb.py index ba3507f..43df93b 100644 --- a/tivars/types/gdb.py +++ b/tivars/types/gdb.py @@ -14,6 +14,10 @@ class GraphMode(Flags): + """ + Flags for GDB graph modes + """ + Dot = {0: 1} Connected = {0: 0} Simul = {1: 1} @@ -42,6 +46,10 @@ class GraphMode(Flags): class SeqMode(Flags): + """ + Flags for sequential GDB plot modes + """ + Time = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0} Web = {0: 1, 1: 0, 2: 0, 3: 0, 4: 0} VertWeb = {0: 0, 1: 1, 2: 0, 3: 0, 4: 0} @@ -51,6 +59,10 @@ class SeqMode(Flags): class GraphStyle(Enum): + """ + Enum of GDB graph styles + """ + SolidLine = b'\x00' ThickLine = b'\x01' ShadeAbove = b'\x02' @@ -64,6 +76,10 @@ class GraphStyle(Enum): class GraphColor(Enum): + """ + Enum of GDB graph colors + """ + Mono = b'\x00' Blue = b'\x01' Red = b'\x02' @@ -87,6 +103,10 @@ class GraphColor(Enum): class GlobalLineStyle(Enum): + """ + Enum of global GDB line styles + """ + Thick = b'\x00' DotThick = b'\x01' Thin = b'\x02' @@ -97,6 +117,10 @@ class GlobalLineStyle(Enum): class BorderColor(Enum): + """ + Enum of GDB graph border colors + """ + LtGray = b'\x01' Teal = b'\x02' LtBlue = b'\x03' @@ -107,6 +131,10 @@ class BorderColor(Enum): class EquationFlags(Flags): + """ + Flags for equations stored in GDBs + """ + Selected = {5: 1} Deselected = {5: 0} UsedForGraph = {6: 1} @@ -116,6 +144,13 @@ class EquationFlags(Flags): class TIGraphedEquation(TIEquation): + """ + Parser for equations stored in GDBs + + A `TIGraphedEquation` is a `TIEquation` with an extra leading flag byte. + The equation's style and color in its GDB is bundled for convenience. + """ + min_data_length = 3 class Raw(TIEntry.Raw): @@ -642,6 +677,13 @@ def coerce(self): class TIGDB(TIMonoGDB): + """ + Base class for all color GDB entries + + A GDB is a collection of equations and graph settings representing the state of one of the equation plotters. + A GDB can correspond to one of the Function, Parametric, Polar, or Sequence plotting modes. + """ + min_data_length = 66 has_color = True diff --git a/tivars/types/list.py b/tivars/types/list.py index 5ce615c..f61bff1 100644 --- a/tivars/types/list.py +++ b/tivars/types/list.py @@ -194,6 +194,10 @@ def string(self) -> str: class TIRealList(ListEntry, register=True): + """ + Parser for lists of real numbers + """ + _E = RealEntry extensions = { @@ -207,6 +211,10 @@ class TIRealList(ListEntry, register=True): class TIComplexList(ListEntry, register=True): + """ + Parser for lists of complex numbers + """ + _E = ComplexEntry extensions = { diff --git a/tivars/types/tokenized.py b/tivars/types/tokenized.py index c15840c..cb964e3 100644 --- a/tivars/types/tokenized.py +++ b/tivars/types/tokenized.py @@ -237,7 +237,7 @@ class TINewEquation(TIEquation, register=True): """ Parser for internal equations - A `TINewEquation` is simply a `TIEquation` with certain internal uses + A `TINewEquation` is simply a `TIEquation` with certain internal uses. """ _type_id = 0x0B