Jump to content

twinpropflyer

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by twinpropflyer

  1. Hi David, I assume, you are climbing with the autopilot, it then levels off at selected altitude and the airspeed starts rising. If it get near the maximum operating speed, the plane starts to climb again. Thats a special function of the default autopilot of X-Plane to avoid overspeed. Since the Dash8 does not have autothrottles, you have to control your speed with the power levers (pull them back). This applies to most of the aircrafts in X-Plane. Happy dashing :-) Jan
  2. Ah..., yeah, got it . But it's not a bug, it's X-Plane ;D
  3. Hi Tom, good to hear you figured it out However, I see no reason why the generic text should not work with ATTR_cockpit_region. I just using some generic text instruments which work flawlessly in a 3d pit with 1 region for the entire panel and a dedicated 3d panel setup in planemaker. Cheers Jan
  4. Hi Tom, the "Datab" (or Byte-Array I called it for me ;-)) is used like the other array type datarefs. You need to reserve a memory area for your data, e.g. char MyText[10]. Then, when the user of your dataref calls your provider function, he provides a pointer to a reserved memory area of its own (void* outValue), an offset to your pointer, from which he want to get the data from (int inOffset) and finally the count of data elements he want to get (long inLenght). In your provider function you now just copy the content from your memory area to the memory area of the user, where inOffset defines the starting point from your pointer and inLength defines the size of the copied memory block. In case of the Datab ref, inLength is always the size in bytes already, for other types you have to calculate the bytesize like "sizeof(int) * inLength" for an integer array. Example: "memcpy(outValue, MyRefText + inOffset, inLength)", where inOffset is "0" and inLength is "10", this will copy 10 bytes starting from MyText + 0 to the provided memory pointer "outValue". Of course, you would have to make sure, that inOffset and inLength are always in the allowed range of your reserved memory, otherwise the memcopy function could cause crashes ;-). Thats the solution that works for me and it came straight out of the examples of the SDK, but there may other working solutions too. Also I just realized, that the range checking code in the example from the .org thread is not very robust, so I will have to change my provider functions a bit. Cheers Jan
  5. Hi Tom, you may find this post helpful: http://forums.x-plane.org/index.php?showtopic=37383&view=&hl=byte%20array&fromsearch=1 Cheers Jan
×
×
  • Create New...