-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.cpp
63 lines (54 loc) · 1.67 KB
/
module.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Copyright (C) 2020, Andrey Stepanov
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file
* \author Andrey Stepanov
* \copyright GNU General Public License v3.0
*/
#define STRICT
#define ORBITER_MODULE
#include "windows.h"
#include "orbitersdk.h"
#include "resource.h"
#include <stdio.h>
#include "ROSBridge.h"
#include "ExtraMenu.h"
ros_bridge::ROSBridge* ros_bridge_ptr;
ros_bridge::ExtraMenuItem* extra_menu_item_ptr;
/**
* \brief Initialization of module
* \detail
* This function is called when Orbiter starts or when the module
* is activated.
*/
DLLCLBK void InitModule (HINSTANCE hModule)
{
ros_bridge_ptr = new ros_bridge::ROSBridge(hModule);
extra_menu_item_ptr = new ros_bridge::ExtraMenuItem(hModule);
oapiRegisterLaunchpadItem(extra_menu_item_ptr);
oapiRegisterModule(ros_bridge_ptr);
}
/**
* \brief Close module
* \detail
* This function is called when Orbiter shuts down or when the
* module is deactivated
*/
DLLCLBK void ExitModule (HINSTANCE hDLL)
{
oapiUnregisterLaunchpadItem(extra_menu_item_ptr);
delete extra_menu_item_ptr;
}