From dbe08c033a3644b710a327b2ac33e844df1bdfce Mon Sep 17 00:00:00 2001 From: Konstantin Lampalzer Date: Fri, 19 Mar 2021 15:21:45 +0100 Subject: [PATCH] Update documentation --- _sources/lib/IRSensor.rst.txt | 17 +++- _static/pygments.css | 7 +- genindex.html | 150 +++------------------------- index.html | 36 ++++--- lib/Api.html | 179 +++++----------------------------- lib/Battery.html | 53 ++++------ lib/Buzzer.html | 52 ++++------ lib/IRSensor.html | 125 +++++++----------------- lib/Logging.html | 31 +++--- lib/Motor.html | 60 ++++-------- lib/Servo.html | 57 ++++------- lib/Vision.html | 69 ++++--------- objects.inv | Bin 800 -> 549 bytes other/usage.html | 33 ++++--- search.html | 23 +++-- searchindex.js | 2 +- 16 files changed, 253 insertions(+), 641 deletions(-) diff --git a/_sources/lib/IRSensor.rst.txt b/_sources/lib/IRSensor.rst.txt index 72e60f9..26332b9 100644 --- a/_sources/lib/IRSensor.rst.txt +++ b/_sources/lib/IRSensor.rst.txt @@ -4,4 +4,19 @@ Infrared Sensor **************** .. autoclass:: compLib.IRSensor.IRSensor - :members: \ No newline at end of file + :members: + +Examples +========= + +Testing analog sensors +------------------------- + +.. code-block:: python + + from compLib import IRSensor + + ir = IRSensor.IRSensor() + + while True: + print ("left: {} middle: {} right: {}".format(ir.bottom_left_analog(), ir.bottom_middle_analog(), ir.bottom_right_analog())) \ No newline at end of file diff --git a/_static/pygments.css b/_static/pygments.css index 631bc92..13b7243 100644 --- a/_static/pygments.css +++ b/_static/pygments.css @@ -1,5 +1,10 @@ +pre { line-height: 125%; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } -.highlight { background: #f8f8f8; } +.highlight { background: #f8f8f8; } .highlight .c { color: #408080; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #008000; font-weight: bold } /* Keyword */ diff --git a/genindex.html b/genindex.html index 0e68a6a..c91cea5 100644 --- a/genindex.html +++ b/genindex.html @@ -3,9 +3,9 @@ - + - + Index — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -51,7 +48,7 @@ - CompLib + CompLib @@ -133,8 +130,6 @@ - -
-

M

- - -
- -

P

- - - -
-

S

- -
- -

T

- - -
@@ -323,25 +192,28 @@
+ diff --git a/index.html b/index.html index aa9bb4b..28c31a9 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,9 @@ - + - + Robo4you Competition Library — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -52,7 +49,7 @@ - CompLib + CompLib @@ -134,8 +131,6 @@ - -
-
  • Infrared Sensor
  • +
  • Infrared Sensor +
  • Logging
  • + diff --git a/lib/Api.html b/lib/Api.html index ec2d26f..b04b240 100644 --- a/lib/Api.html +++ b/lib/Api.html @@ -3,9 +3,9 @@ - + - + Api — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -145,8 +142,6 @@ - -
    @@ -352,10 +217,10 @@
    from compLib.Api import DoubleElim
     
     position, status = DoubleElim.get_position()
    -print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
    +print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
     
     goal, status = DoubleElim.get_goal()
    -print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
    +print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
     
    @@ -367,29 +232,37 @@ + diff --git a/lib/Battery.html b/lib/Battery.html index 8f783cb..3919495 100644 --- a/lib/Battery.html +++ b/lib/Battery.html @@ -3,9 +3,9 @@ - + - + Battery — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -142,8 +139,6 @@ - -
    + diff --git a/lib/Buzzer.html b/lib/Buzzer.html index 61ce7e4..7caf230 100644 --- a/lib/Buzzer.html +++ b/lib/Buzzer.html @@ -3,9 +3,9 @@ - + - + Buzzer — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -142,8 +139,6 @@ - -
    + diff --git a/lib/IRSensor.html b/lib/IRSensor.html index ecc25d9..37a7164 100644 --- a/lib/IRSensor.html +++ b/lib/IRSensor.html @@ -3,9 +3,9 @@ - + - + Infrared Sensor — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -90,7 +87,13 @@
  • Api
  • Battery
  • Buzzer
  • -
  • Infrared Sensor
  • +
  • Infrared Sensor +
  • Logging
  • Motor
  • Servo
  • @@ -135,8 +138,6 @@ - -
    + + @@ -247,29 +186,37 @@ + diff --git a/lib/Logging.html b/lib/Logging.html index 809c3e6..69c2b5e 100644 --- a/lib/Logging.html +++ b/lib/Logging.html @@ -3,9 +3,9 @@ - + - + Logging — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -142,8 +139,6 @@ - -
    + diff --git a/lib/Motor.html b/lib/Motor.html index ad36309..a15d264 100644 --- a/lib/Motor.html +++ b/lib/Motor.html @@ -3,9 +3,9 @@ - + - + Motor — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -142,8 +139,6 @@ - -
    diff --git a/lib/Servo.html b/lib/Servo.html index 82ebd9f..3619e9d 100644 --- a/lib/Servo.html +++ b/lib/Servo.html @@ -3,9 +3,9 @@ - + - + Servo — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -135,8 +132,6 @@ - -
    + diff --git a/lib/Vision.html b/lib/Vision.html index f8f9ad0..58bef60 100644 --- a/lib/Vision.html +++ b/lib/Vision.html @@ -3,9 +3,9 @@ - + - + Vision — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -52,7 +49,7 @@ - CompLib + CompLib @@ -142,8 +139,6 @@ - -

    Examples

    @@ -226,7 +186,7 @@ an instance of this class!

    import cv2
     from compLib import Vision
     
    -while True:
    +while True:
         # get newest opencv frame from camera
         frame = Vision.Streaming.get_frame()
     
    @@ -251,7 +211,7 @@ point your raspberry pi camera to a chessboard and it should be detected.

    import cv2
     from compLib import Vision
     
    -while True:
    +while True:
         # get newest opencv frame from camera
         frame = Vision.Streaming.get_frame()
     
    @@ -261,7 +221,7 @@ point your raspberry pi camera to a chessboard and it should be detected.

    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # find the chessboard corners - ret, corners = cv2.findChessboardCorners(gray, (6, 9), None) + ret, corners = cv2.findChessboardCorners(gray, (6, 9), None) # draw detected chessboard position onto the image cv2.drawChessboardCorners(frame, (6, 9), corners, ret) @@ -284,28 +244,35 @@ point your raspberry pi camera to a chessboard and it should be detected.

    +
    diff --git a/objects.inv b/objects.inv index 409a1c99edd8ad67894fc262193fda76536de460..e2d89b3f7a6fde520a6a144b82c6ab28b08e3b24 100644 GIT binary patch delta 442 zcmV;r0Y(0x2Bid$b$^|d!EVDK42JK03Z(9uPL+1*ZQH3*CsnPsD@p=OkdhDuQZ0S@ zfeiuDYL#}1G2d@o|Ikvl{XrC)gRGR!Rc*eN=&FtTl78BiO|BH#l13EIe!JFfvwkAk zs{C8Osko+%iTPklwOrSd{kN7fwHPnP>T#)xccNqbhbYZ(F{$s63~{V)ACEptXNxr#=%6vmSzZUOv<)VIe#5?Kg=JoDiqmn0;S zgb>Itq3lE#D1T;=#n{3$ce9?|jHkUei_8*k>a>Wao+#qEgUXYU2eb$tq~hQLYLN?u zP%)@rNTN+F0rkw@@dqA__a~{7+;v;VlaX7ro!v^b!7orEH9JSu>|CM>-hm3K*+qH@ zE+(?bN66kV#e@&!@xH)5sGEkWaw6K1(J=!zE`$y7tFcC)zx(6tq*Nr3exRlDq8afE7GmJkk3SGklirO&p0gK;-vy)zLW)*9klQ7Ap7BL zTfcanlqy)*?*jAb^$3mPax~^!j)2?LG~-(H8Z$VZ2e89WO^brT|L`PfS^Zl`nhSR> zd`Zx)&Rj@4ynj9OQfZNp3`ypkqj6*JfLCL;n0&clL=Pv z+=2qcE6@1Hj<@KGi3_y9K@*=OvP=3`Af$#512RSuH0?Pq?B%HcNv5WI2A^6n@^%uI z{2U&&0&`MxYZ40NCzGJ4=EShpQ2&#R$vsC;8IPQqj43roPI-o$nM|t9p@Ejj+ZK#T zf7hd$(SI{+ehwDV-#X5MTaOsg8){htGSC2LlLj$4cn}@e<0e5cm1+_s;>O+CvPbNK zKCZ0}`b2)BZfM;M$UrSzk7`BSphH=vM~%v1H7Xaef*xU69yO|n-zF6!T3C~o*W-Fg zYhEl=sOS#E!jM))Yo2pot6Wzg?^{Jm2$Lq5_AsO$*7RsRp~p?;_&Yao@JP=M; - + - + Usage — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - - @@ -53,7 +50,7 @@ - CompLib + CompLib @@ -135,8 +132,6 @@ - -
      @@ -148,7 +143,7 @@
    • - + View page source @@ -176,7 +171,7 @@ Motor.power(port, -30); def main(): - print("hallo ich bin ein roboter beep buup") + print("hallo ich bin ein roboter beep buup") forward() time.sleep(1) @@ -194,29 +189,37 @@
    +
    diff --git a/search.html b/search.html index f005a84..dc9c708 100644 --- a/search.html +++ b/search.html @@ -3,9 +3,9 @@ - + - + Search — CompLib 0.0.2 documentation @@ -16,13 +16,10 @@ - - -