Metadata-Version: 2.4
Name: pixhawk-lib
Version: 0.2.2
Summary: A simple library for controlling Pixhawk drones easy.
Author-email: Sharikian <wacoinseig@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Your Name
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/sharikian/pixhawk-lib
Project-URL: Repository, https://github.com/sharikian/pixhawk-lib
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dronekit>=2.9.2
Requires-Dist: pymavlink>=2.4.40
Requires-Dist: pyserial
Requires-Dist: flask
Dynamic: license-file

# PixHawk Library


A simple Python library for controlling Pixhawk drones easy. It provides an easy-to-use interface for basic flight commands, state retrieval, safety checks, and playing tunes on the Pixhawk buzzer.

## ⚠️ Danger
This is under develop project and not stable

## Installation

```bash
pip install pixhawk-lib
```

## Usage

```python
from pixhawk_lib import PixHawk

# Initialize with default settings (non-blocking)
drone = PixHawk(connection_string='/dev/ttyACM0')

# Take off and rotate
drone.takeoff(5)  # Take off to 5 meters
drone.clockwise(90)  # Rotate 90 degrees clockwise
drone.land()  # Land the drone

# With waiting enabled
drone = PixHawk(wait_until_done=True)
drone.takeoff(5)  # Waits until 5 meters is reached
drone.play_tune('HAPPY_BIRTHDAY')  # Play a tune
drone.disconnect()
```

## Features

- Basic flight commands: takeoff, land, clockwise, counterclockwise
- Movement: move_forward, move_left, etc. (in centimeters)
- Continuous movement: forward, stop, etc.
- State retrieval: drone.state.battery(), drone.state.gps(), etc.
- Safety decorators: Battery and GPS checks
- Tunes: Predefined tunes like HAPPY_BIRTHDAY, DANGER

## Requirements

- Python 3.9+
- DroneKit
- PyMAVLink
- pyserial

## License

- MIT License

