Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Some cleanups

Oleg Kalachev70eae3e55621
diff --git a/Makefile b/Makefile
index d66ae71..25aa1d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-SRC := $(wildcard flix/*.ino flix/*.cpp flix/*.hpp)
BOARD = esp32:esp32:d1_mini32
PORT := $(wildcard /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_* /dev/serial/by-id/usb-1a86_USB_Single_Serial_* /dev/cu.usbserial-*)
PORT := $(strip $(PORT))
@@ -31,10 +30,10 @@ simulator: build_simulator
GAZEBO_PLUGIN_PATH=$$GAZEBO_PLUGIN_PATH:${CURDIR}/gazebo/build \
gazebo --verbose ${CURDIR}/gazebo/flix.world
-grab_log:
+log:
PORT=$(PORT) tools/grab_log.py
clean:
rm -rf gazebo/build flix/build flix/cache .dependencies
-.PHONY: build upload monitor dependencies cmake build_simulator simulator grab_log clean
+.PHONY: build upload monitor dependencies cmake build_simulator simulator log clean
diff --git a/flix/vector.h b/flix/vector.h
index 2d1b1ee..105f6df 100644
--- a/flix/vector.h
+++ b/flix/vector.h
@@ -32,7 +32,7 @@ public:
z /= n;
}
- Vector operator * (float b)
+ Vector operator * (const float b) const
{
return Vector(x * b, y * b, z * b);
}
diff --git a/gazebo/models/floor/floor.sdf b/gazebo/models/floor/floor.sdf
index 9363daf..5898d2d 100644
--- a/gazebo/models/floor/floor.sdf
+++ b/gazebo/models/floor/floor.sdf
@@ -1,31 +1,31 @@
-<?xml version="1.0" ?>
+<?xml version="1.0"?>
<sdf version="1.5">
- <model name="floor">
- <static>true</static>
- <link name="link">
- <pose>0 0 -0.02 0 0 0</pose>
- <collision name="collision">
- <geometry>
- <box>
- <size>200 200 .02</size>
- </box>
- </geometry>
- </collision>
- <visual name="visual">
- <cast_shadows>false</cast_shadows>
- <geometry>
- <box>
- <size>200 200 .02</size>
- </box>
- </geometry>
- <material>
- <script>
- <uri>model://floor/materials/scripts</uri>
- <uri>model://floor/materials/textures</uri>
- <name>parquet</name>
- </script>
- </material>
- </visual>
- </link>
- </model>
+ <model name="floor">
+ <static>true</static>
+ <link name="link">
+ <pose>0 0 -0.02 0 0 0</pose>
+ <collision name="collision">
+ <geometry>
+ <box>
+ <size>200 200 .02</size>
+ </box>
+ </geometry>
+ </collision>
+ <visual name="visual">
+ <cast_shadows>false</cast_shadows>
+ <geometry>
+ <box>
+ <size>200 200 .02</size>
+ </box>
+ </geometry>
+ <material>
+ <script>
+ <uri>model://floor/materials/scripts</uri>
+ <uri>model://floor/materials/textures</uri>
+ <name>parquet</name>
+ </script>
+ </material>
+ </visual>
+ </link>
+ </model>
</sdf>