Repository navigation
Exposes target_system on connect(). Exposes MAVConnection. - #448
Conversation
|
@tcr3dr Can you confirm that parameters are the system/component ID that we are connecting to, and that the plan is to use these when sending messages as in #400 rather than whatever value the user puts in: Is that correct? Are the 0 values above just ignored? My feeling is that this isn't quite right. I think if you have a function like the above which you are explicitly calling it should obey the system/target you enter. If we use the function internally in an exposed API (e.g. goto) then we would pass in our target_system value because this is the target that the vehicle represents. Things are different for target_component because a vehicle represents a particular system, not a particular system and component. Do we really want to switch vehicle to talk to a camera mount (say)? I suspect that we will need to use broadcast ID to talk to components and hope that the message gets forwarded appropriately. When sending messages "manually" as above, I would assume the coder would think about which component ID they want to direct it to, and we shouldn't override that (just advise use of the broadcast id) Last of all, we also want DroneKit to be able to change its own system_id so that it is possible for multiple dronekit systems to co-exist and communicate with each other. I am not sure if DK also needs to be able to set its own component ID, but let's pretend a use case exists .... Hope some of that makes sense. As I said, I may have got this completely wrong. |
|
This PR now only allows the specification of the target_system ID. This is all that gets overwritten in MAVLink commands sent using the vehicle object. If you deliver messages directly to the vehicle We should support the changing of our own system's system_id, but I am not sure how that logic works yet, and seems like it can be an enhancement. |
|
@tcr3dr Isn't the target_system id the ID of the system you want to talk to? In that case, wouldn't you be better off querying that from the vehicle you've connected to rather than trying to set it in connect?. I presume this is what we do now but maybe we just always broadcast. Once we have the value, however we get it, then yes, we should use it for our internal message sending since My (possibly idiotic) take on communicating with other systems is that if you want to do this you should create a separate vehicle object and handle any inter-vehicle communication in your script. The implication of this is
Yes, changing our own system_id is an enhancement. I don't think this is complicated - and in most cases it is something you wouldn't need to do. I'll leave you to create a separate issue because I'm a little lazy! |
Exposes target_system on connect(). Exposes MAVConnection.
|
I still think it doesn't make much sense to allow people to specify the target_system - this should be obtained from the connected vehicle. That said, can you confirm that target_system parameter is only thing requiring docs from this? |
|
@hamishwillee See #458. It makes sense in that we actually have a manual override in the Solo code—also this is the first step to implementing it as an automatic process.
|
|
@tcr3dr Does this also set the target_system used when you set a |
See #400.