Skip to content

Commit

Permalink
#27 - Changes required to make the generated code work properly. Also
Browse files Browse the repository at this point in the history
deleted some unused, older code associated with the animated watch.
  • Loading branch information
John Wolfe committed Jul 17, 2014
1 parent a1eb4d2 commit 98460e0
Show file tree
Hide file tree
Showing 38 changed files with 1,020 additions and 630 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1349978509510_8&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/GPS Watch&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="" value="Console"/>
</mapAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:/MGC4112/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.binary_4.1.12/mc3020/bin/xtumlmc_build.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=" -home &quot;C:/MGC4112/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.binary_4.1.12/&quot; -l3b -e -d code_generation -O ../../src/"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}/gen"/>
</launchConfiguration>
</launchConfiguration>

This file was deleted.

This file was deleted.

This file was deleted.

61 changes: 45 additions & 16 deletions applications/gps/GPS Watch/.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<name>com.mentor.nucleus.bp.mc.c.binary.export_builder</name>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/com.mentor.nucleus.bp.mc.c.binary.export_builder.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
Expand All @@ -26,12 +21,51 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.genmakebuilder.launch</value>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/GPS Watch/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
Expand All @@ -41,13 +75,8 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
Expand Down
Binary file modified applications/gps/GPS Watch/Debug/GPSWatch.exe
Binary file not shown.
Binary file modified applications/gps/GPS Watch/bin/lib/SetData.class
Binary file not shown.
Binary file not shown.
Binary file removed applications/gps/GPS Watch/bin/library/UI.class
Binary file not shown.
29 changes: 29 additions & 0 deletions applications/gps/GPS Watch/gen/MATH_bridge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*----------------------------------------------------------------------------
* File: MATH_bridge.c
*
* Description:
* Methods for bridging to an external entity.
*
* External Entity: Math (MATH)
*
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#include "GPSWatch_sys_types.h"
#include "LOG_bridge.h"
#include "MATH_bridge.h"
#include "TIM_bridge.h"
#include "MATH_bridge.h"
#include "GPSWatch_sys_types.h"
#include <math.h>

/*
* Bridge: sqrt
*/
r_t
MATH_sqrt( const r_t p_x )
{
return( sqrt( p_x ) );
}


15 changes: 13 additions & 2 deletions applications/gps/GPS Watch/gen/UI_GuiBridge_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define WIN32_LEAN_AND_MEAN /* define win 32 only */
#define SIGNAL_NO_SET_DATA 0
#define SIGNAL_NO_SET_TIME 1
#define SIGNAL_NO_SET_INDICATOR 2


SOCKET sock; /* socket details */
Expand Down Expand Up @@ -102,7 +103,17 @@ UI_GuiBridge_setData( i_t p_unit, r_t p_value )
err = send(sock,buf,strlen(buf),0);
}


/*
* Bridge: setIndicator
*/
void
UI_GuiBridge_setIndicator( i_t p_value )
{
int err;
char buf[50];
sprintf(buf, "%d,%d\n", SIGNAL_NO_SET_INDICATOR, p_value );
err = send(sock,buf,strlen(buf),0);
}
/*
* Bridge: setTime
*/
Expand All @@ -128,7 +139,7 @@ UI_GuiBridge_connect( void )
float socklib_ver; /* socket dll version */
char cIP[50];

while (true) /* continue till a connection has been made */
while (TRUE) /* continue till a connection has been made */
{
wVersionRequested = MAKEWORD( 1, 1 );
if ( WSAStartup( wVersionRequested, &wsaData ) != 0 )
Expand Down
1 change: 1 addition & 0 deletions applications/gps/GPS Watch/gen/domain.mark
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
.// .invoke MarkInitializationFunction( "SeatHeater", "test" )
.//
.invoke MarkInitializationFunction( "UI", "init" )
.invoke MarkInitializationFunction( "Tracking", "GoalTest_1" )
.// Notes:
.// (1) If multiple functions are tagged, they will be invoked in
.// alphabetical order.
Expand Down
7 changes: 0 additions & 7 deletions applications/gps/GPS Watch/javasrc/lib/SetData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.DataOutputStream;
import java.util.StringTokenizer;
import uidatatypes.Unit;

public class SetData extends SignalData {
public static final long serialVersionUID = 0;
Expand All @@ -20,12 +19,6 @@ public SetData(float value, int unit) {
this.unit = unit;
}

public SetData(float value, Unit unit) {
super(SIGNAL_NO_SET_DATA);
this.value = value;
this.unit = unit.getValue();
}

@Override
public void unserialize(StringTokenizer in) {
value = Float.parseFloat(in.nextToken());
Expand Down
Loading

0 comments on commit 98460e0

Please sign in to comment.