HilHr
(Ivan)
April 30, 2020, 9:33am
1
I use ArduCopter v4.0.3 in mission Planner, CU is Holybro pixhawk 4, everything is connected to Arduino UNO R3 and configured as instructed but unfortunately I get an error all the time:
V1.0
Assertion failed in function: setTxPower
Filename: C:\Users\qwerf\Documents\Arduino\libraries\Pozyx-Arduino-library-master\Pozyx_lib.cpp
Line number: 337
What a mistake I’m making, Please help.
Arduino sketch:
pozyx_drone_mission_planner.zip (3.6 KB)
ppoirier
(ppoirier)
April 30, 2020, 9:41am
2
Hello
This message says that your Arduino cannot set RF power level on the pozyx card
Looking at code , you have to change these lines with your tags I’d
#include <Pozyx.h>
#include <Pozyx_definitions.h>
#include <SoftwareSerial.h>
#include <Wire.h>
////////////////// Pozyx Prams //////////////////////////////
#define CONFIG_TX_GAIN 33.5f
#define NUM_ANCHORS 4
// the network id of the anchors: change these to the network ids of your anchors.
uint16_t anchor_id[4] = { 0x601C, // (0,0)
0x6020, // x-axis
0x6057, // y-axis
0x605E};
// only required for manual anchor calibration.
// Please change this to the coordinates measured for the anchors
int32_t anchors_x[NUM_ANCHORS] = {0, 10000, 0, 10000}; // anchor x-coorindates in mm (horizontal)
int32_t anchors_y[NUM_ANCHORS] = {0, 0, 10000, 10000}; // anchor y-coordinates in mm (vertical)
int32_t heights[NUM_ANCHORS] = {-1200, -1200, -1200, -1200}; // anchor z-coordinates in mm (1.2m above vehicle's starting altitude)
HilHr
(Ivan)
April 30, 2020, 4:04pm
3
Hello , thank you for help
I did change it:
anchors id is 24904 what is 0x6148 hex
anchors id is 34951 what is 0x8887 hex
anchors id is 38491 what is 0x965B hex
anchors id is 47960 what is 0xBB58 hex
I just rewrote the anchor decimal numbers and convert them to hex.
Did I do it well or do I need something different?
Thank you
ppoirier
(ppoirier)
April 30, 2020, 10:27pm
4
Looks Good, Unfortunately I dont have these, maybe @rmackay9 could help you.
Have you tried the examples proviided by Pozyx ?
HilHr
(Ivan)
May 1, 2020, 12:26am
5
I contacted @ rmackay9 but haven’t received a response yet.
I tried a couple of examples, some work some do not.
I think my tag just transmits its position to the anchors but it should collect information where are the anchors based on his position.
Is it possible to somehow change this on the tag?
On the tag Tx led blinks ,while the Rx not blinking at all.
ppoirier
(ppoirier)
May 1, 2020, 12:30am
6
Just give him a few time @rmackay9 is quite busy
I read as well that you need the latest firmware, maybe you could check if it is the case
Good Luck
HilHr
(Ivan)
May 8, 2020, 12:58am
7
I successfully upgraded the tag (2.2) ,anchors (1.7 ) and gateway software (2020.2) .Unfortunately, I still get an error in the arduino.
Please look at the configuration , I think I set everything up well according to the instructions , but unfortunately there are no instructions/parameters that I need to set on the tag, gateway and anchors themselves.
RobGei
(Rob Gei)
September 28, 2020, 9:03am
9
HI there,
the problem is the assertation for the Tx Power in the Pozyx lib. In the current IndoorLoiter sketch it is set too high. Try reducing it:
#define CONFIG_TX_GAIN 33.0f
That should work.
Best regards
1 Like