Renamed "setDREF" function back to "sendDREF".

This commit is contained in:
Jason Watkins
2015-04-27 10:02:31 -07:00
parent 22a2adf5f2
commit 8932edbd67
11 changed files with 19 additions and 19 deletions

View File

@@ -150,7 +150,7 @@ int sendDREFTest() // sendDREF test
}
// Execution
setDREF(sock, drefs[0], &value, 1);
sendDREF(sock, drefs[0], &value, 1);
int result = getDREFs(sock, drefs, data, 1, sizes);
// Close

View File

@@ -308,7 +308,7 @@ public class XPlaneConnectTest
float gearHandle = xpc.getDREF(dref)[0];
float value = gearHandle > 0.5 ? 0 : 1;
xpc.setDREF(dref, value);
xpc.sendDREF(dref, value);
float result = xpc.getDREF(dref)[0];
assertEquals(value, result, 1e-4);
@@ -320,7 +320,7 @@ public class XPlaneConnectTest
{
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(null, 0);
xpc.sendDREF(null, 0);
fail();
}
}
@@ -332,7 +332,7 @@ public class XPlaneConnectTest
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(dref, null);
xpc.sendDREF(dref, null);
fail();
}
}
@@ -343,7 +343,7 @@ public class XPlaneConnectTest
String dref = "sim/cockpit/switches/gear_handle_status";
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(dref, new float[0]);
xpc.sendDREF(dref, new float[0]);
fail();
}
}
@@ -358,7 +358,7 @@ public class XPlaneConnectTest
String dref = "sim/cockpit/switches/gear_handle_status";
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(dref, new float[200]);
xpc.sendDREF(dref, new float[200]);
}
}
@@ -368,7 +368,7 @@ public class XPlaneConnectTest
String dref = "sim/cockpit/switches/i/am/a/very/long/fake/dref/that/is/over/255/characters/./which/means/that/my/length/cant/be/encoded/in/the/single/byte/allocated/by/the/message/format/,/so/i/should/cause/an/exception/instead/./i/am/still/not/long/enough/./almost/there";
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(dref, 0);
xpc.sendDREF(dref, 0);
fail();
}
}
@@ -379,7 +379,7 @@ public class XPlaneConnectTest
String dref = "";
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.setDREF(dref, 0);
xpc.sendDREF(dref, 0);
fail();
}
}

View File

@@ -1,4 +1,4 @@
function setDREFTest( )
function sendDREFTest( )
%SENDREADTEST Summary of this function goes here
% Detailed explanation goes here
addpath('../../MATLAB')
@@ -7,7 +7,7 @@ import XPlaneConnect.*
DREFS = {'sim/cockpit/switches/gear_handle_status'};
value = randi([0 10]);
setDREF(DREFS{1},value);
sendDREF(DREFS{1},value);
result = getDREFs(DREFS);
assert(isequal(length(result),1),'setDREFTest: requestDREF unsucessful-wrong number of elements returned');

View File

@@ -13,7 +13,7 @@ disp(['XPC Tests-MATLAB (', os, ')']);
theTests = {{@openCloseTest, 'Open/Close Test', 0},...
{@sendTEXTTest,'TEXT Test', 0},...
{@getDREFsTest,'Request DREF Test', 0},...
{@setDREFTest,'Send DREF Test', 0},...
{@sendDREFTest,'Send DREF Test', 0},...
{@DATATest,'DATA Test', 0},...
{@CTRLTest,'CTRL Test', 0},...
{@POSITest,'POSI Test', 0},...